John Kessenich
4728509962
Merge pull request #2310 from ben-clayton/license-checker
...
Add license checking continuous and presubmit tests
2020-07-02 23:33:30 -06:00
Ben Clayton
cb4788c7a6
Fix GLSLANG_IS_SHARED_LIBRARY define
...
It was incorrectly always being set, causing linker warnings for MSVC builds.
Also simplify the preprocessor nesting in `glslang\Public\ShaderLang.h`
2020-07-02 16:10:20 +01:00
Ben Clayton
1d21270ebf
Add missing copyright headers
...
Add copyright headers to build files and scripts.
Simplifies automated scanning for bad license headers.
2020-07-02 16:03:48 +01:00
Ben Clayton
d64e859987
glslang: Only export public interface for SOs
...
Default to `-fvisibility=hidden`, and annotate the public glslang interface with `GLSLANG_EXPORT` to change the visibility of these cherry-picked symbols to default.
This is also used by Windows builds for `__declspec(dllexport)`-ing the public DLL interface.
This allows us to classify API changes into those that are publicly backwards compatible, and those that are not.
Note that `libSPIRV` will likely need similar treatment.
Issues: #2283 , #1484
2020-06-30 17:06:17 +01:00
John Kessenich
8f4251a708
Merge pull request #2297 from ben-clayton/fpic
...
CMake: Compile with -fPIC when building SOs
2020-06-30 07:55:53 -06:00
Ben Clayton
981e127698
CMake: Compile with -fPIC when building SOs
...
Without this embedding static libraries into shared libraries may result in link time errors.
Issue: #2283
2020-06-29 14:57:47 +01:00
Ben Clayton
1fee6072d0
CMake: Error on unresolved symbols
...
Issue: #1484
2020-06-29 14:57:12 +01:00
Evgeny Proydakov
b90adef928
Fixed msvc 2019 nmake compiler warnings with RTTI.
...
By default cmake generates cxx_flags with `/GR` parameter.
I updated CMAKE_CXX_FLAGS string and replaced `/GR` -> `/GR-`
How to reproduce:
Visual Studio 2019 x64 command port
mkdir build-msvc2019
cd build-msvc2019
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=install ..
nmake
COMPILATION BEFORE:
Scanning dependencies of target OSDependent
[ 1%] Building CXX object glslang/OSDependent/Windows/CMakeFiles/OSDependent.dir/ossource.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
ossource.cpp
[ 3%] Linking CXX static library OSDependent.lib
[ 3%] Built target OSDependent
Scanning dependencies of target OGLCompiler
[ 4%] Building CXX object OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/InitializeDll.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
InitializeDll.cpp
[ 6%] Linking CXX static library OGLCompiler.lib
[ 6%] Built target OGLCompiler
Scanning dependencies of target glslang
[ 7%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/glslang_tab.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
glslang_tab.cpp
[ 9%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/attribute.cpp.obj
cl : Command line warning D9025 : overriding '/GR' with '/GR-'
FLAGS BEFORE:
-- CMAKE_C_FLAGS: /DWIN32 /D_WINDOWS /W3
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc
-- CMAKE_CXX_FLAGS_DEBUG: /MDd /Zi /Ob0 /Od /RTC1
-- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /DNDEBUG
COMPILATION AFTER:
[ 1%] Building CXX object glslang/OSDependent/Windows/CMakeFiles/OSDependent.dir/ossource.cpp.obj
ossource.cpp
[ 3%] Linking CXX static library OSDependent.lib
[ 3%] Built target OSDependent
[ 4%] Building CXX object OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/InitializeDll.cpp.obj
InitializeDll.cpp
[ 6%] Linking CXX static library OGLCompiler.lib
[ 6%] Built target OGLCompiler
[ 7%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/glslang_tab.cpp.obj
glslang_tab.cpp
[ 9%] Building CXX object glslang/CMakeFiles/glslang.dir/MachineIndependent/attribute.cpp.obj
FLAGS AFTER:
-- CMAKE_C_FLAGS: /DWIN32 /D_WINDOWS /W3
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /W3 /GR- /EHsc
-- CMAKE_CXX_FLAGS_DEBUG: /MDd /Zi /Ob0 /Od /RTC1
-- CMAKE_CXX_FLAGS_RELEASE: /MD /O2 /Ob2 /DNDEBUG
2020-06-23 22:02:34 +03:00
nihui
a0cce739bc
Do not build glslang-testsuite when ENABLE_CTEST is disabled ( #2240 )
2020-05-21 05:33:17 -06:00
nihui
044113abe8
Add an option to make Exceptions enabled ( #2239 )
...
* Add an option to make Exceptions enabled
* /EHsc enable exceptions since vs2003
2020-05-20 23:55:24 -06:00
Malacath-92
fd593d5f08
Get rid of all warnings with MSVC and clang-cl ( #2177 )
2020-04-10 02:39:16 -06:00
Kai Ninomiya
16bb8881e6
Fix build on CMake 2.8, and fix Web build
...
And suppress some warnings that are too verbose in Web builds.
2020-03-23 12:34:55 -07:00
durswd
b848387262
Add an option to make RTTI enabled
2020-02-18 02:37:09 +09:00
Kai Ninomiya
5166bc1859
Split "is emscripten" config from "enable glslang.js"
...
This should enable glslang to be used as a dependency of other projects
that target WebAssembly, instead of assuming "EMSCRIPTEN" => "Want
glslang.js".
2020-02-06 14:06:20 -08:00
Jeff Bolz
141dbedeac
Use NOT ... VERSION_LESS instead of VERSION_GREATER_EQUAL
2020-01-29 21:39:13 -06:00
John Kessenich
d5f2f7b93d
Merge pull request #1940 from tsuoranta/fix-gcc9
...
Fix for GCC 9 / Werror=deprecated-copy
2020-01-27 01:02:08 -07:00
Sergey Kosarevsky
3b8d94f422
Add option ENABLE_CTEST to skip testing
2019-10-25 11:57:11 +03:00
Timo Suoranta
5e634c8999
Enable generation of compile_commands.json ( #1938 )
2019-10-21 22:38:04 -06:00
Timo Suoranta
f0a85fc744
Fixes for gcc 9 / -Werror=deprecated-copy
...
Also enable -Werror-deprecated-copy for GCC version 9 and later.
2019-10-19 15:36:34 +03:00
John Kessenich
a959deb007
Merge pull request #1933 from dj2/runtest
...
Make runtests configurable.
2019-10-16 20:53:39 -06:00
Dan Sinclair
3290d38011
Use commandline options instead of ENV variables
2019-10-16 13:08:48 -04:00
John Kessenich
9e4f6d03f2
Merge pull request #1932 from zoddicus/anotherSemiColonFix
...
Fix config issues and revert previous fixes for semi-colon issues
2019-10-16 10:39:51 -06:00
dan sinclair
7d623e1c90
Indenting
2019-10-16 10:45:11 -04:00
dan sinclair
0f98465f0a
Update CMakeLists.txt
2019-10-15 19:11:39 -04:00
Dan Sinclair
3f072e158c
Move TARGETDIR as well
2019-10-15 16:47:28 -04:00
Dan Sinclair
167201430d
Make runtests configurable.
...
This CL allows setting the location of glslangValidator and spirv-remap
when calling the runtests script. A test target is added to CMake to
execute runtests and sets the location to the build folder for the two
applications.
2019-10-15 15:21:21 -04:00
Ryan Harrison
1aeceaea7d
Fix config issues and revert previous fixes for semi-colon issues
...
This reverts commit 41261d95a4
.
This reverts commit 7c9accb653
.
Instead of trying to work around all of the potential semicolon issues
in glslang, making it conform to Chromium's style, mark the code
explicitly as non-chromium in the BUILD.gn, so chromium doesn't
attempt to enforce its style rules on glslang.
Fixes #1931
2019-10-15 14:45:02 -04:00
durswd
0539823243
Added an option to make pch enabled in Cmake
2019-10-16 02:28:40 +09:00
Fabian Wahlster
03be018a47
find Python and add External subdir only if BUILD_EXTERNAL option was set (on by default) and /External dir exists
2019-10-15 11:00:23 +02:00
Ryan Harrison
41261d95a4
Forgot that GCC doesn't recognize this flag
2019-10-11 13:18:07 -04:00
Ryan Harrison
7c9accb653
Remove unnecessary semi-colons and add warning about them
...
These are causing integration issues with Chromium down stream since
it is more strict about these.
2019-10-11 11:25:04 -04:00
Kai Ninomiya
230117a02c
use custom es6 modularization instead of MODULARIZE=1
2019-09-18 00:04:09 -07:00
Kai Ninomiya
4391924ac5
Separate GLSLANG_WEB (min-size build) and Emscripten options
...
Allows building non-min-size builds with Emscripten.
Adds ENABLE_GLSLANG_WEB_DEVEL.
Moves the glslang.js files to OSDependent/Web.
Small cleanups and docs update.
2019-09-17 23:18:03 -07:00
John Kessenich
eaf4496312
Web: Complete the removal of vendor-specific #ifdef's, including CMake.
2019-08-20 23:21:56 -06:00
John Kessenich
23d27751e8
Web: Selectively remove a few key features, using #ifndef GLSLANG_WEB
...
Save about 100K.
N.B.: This is done by eliminating a function call, at a high level,
not by #ifdef'ing a bunch of code.
Also, removed no longer needed *_EXTENSION #ifdef in the code not
needed by GLSLANG_WEB.
2019-08-20 23:21:55 -06:00
Kai Ninomiya
a91561d583
enable build for node
2019-08-20 13:10:53 -07:00
Ryan Harrison
7eb3e6e07a
Make non-emscripten flags platform agnostic.
2019-08-09 11:19:07 -04:00
Ryan Harrison
c1063cd5e2
Converted ENABLE_HLSL to a dependent option, so it can be always disabled in web builds
2019-08-09 10:56:51 -04:00
Ryan Harrison
c96e42dca8
Add WASM build target for Web version of glslang
...
This adds build rules to support generating a WASM binary to be used
on the web. The API exposed to web applications is definated in the
new glslang.js.cpp file.
2019-08-08 15:08:10 -04:00
Ryan Harrison
8126eb1962
Convert no RTTI rule to be compiler specific
...
MSVC uses a different flag for disabling RTTI, so is currently
including RTTI information and throwing warnings.
2019-07-30 11:25:19 -04:00
Ryan Harrison
bbf172b518
Explicitly remove RTTI in the top-level build config
...
Fixes #1831
2019-07-12 14:25:18 -04:00
John Kessenich
6fef1ca6f9
Latest known-good SPIRV-Tools: WARNING: Needs python 3.x.
...
You may need to install python 3.x and also
[windows users] may need to get it in your path in front of python 2.7.x.
If you don't need the external projects (i.e., SPIRV-Tools) and don't want
to upgrade to python 3, don't create the External subdirectory and CMake
won't require python 3. (CMake has a bug that makes it find the wrong one
on a first pass if the top level does not require the version needed by
lower levels.)
2019-05-09 10:11:54 -06:00
Nuno Subtil
424612c0e7
build: Do not cache debug library suffix
...
For nested project builds, writing CMAKE_DEBUG_POSTFIX into the cache
ends up affecting other projects. Caching this value doesn't seem to be
required in practice, so this change removes the cache tag.
2019-01-25 09:30:37 -08:00
Jeff Bolz
0a93cfbb79
Update to newest SPIRV-Tools. It checks the Vulkan rule that all resources must have a set and binding decoration, which many tests fail. So add code to set a default value of zero. Also disable PCH for Ninja builds.
2018-12-11 20:58:29 -06:00
David Neto
0392544b7a
PCH filename depends on current binary dir
...
Fixes #1572
2018-11-12 17:09:07 -05:00
Jeff Bolz
02ed310ac3
Rename PCH macro to glslang_pch (to avoid name collision) and update to latest spirv-tools
2018-11-07 09:35:31 -06:00
Jeff Bolz
22d0b7cbad
Use precompiled headers for some glslang projects
2018-10-31 15:38:08 -05:00
John Kessenich
5d6b567950
Merge pull request #1436 from karl-lunarg/karl-ccache
...
build: Add ccache option to CMake config
2018-07-18 20:39:31 -07:00
Matthew Albrecht
f9c2aeb736
Allowed debug postfix to be changed.
2018-07-07 17:00:08 -05:00
Matthew Albrecht
857f25cfd2
Added the cmake option to disable building SPVRemapper.
2018-07-07 16:54:34 -05:00