Commit Graph

88 Commits

Author SHA1 Message Date
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
Karl Schultz
23770b9aae build: Add ccache option to CMake config
This is totally optional, but lets people build this repo with
ccache to improve rebuild speeds.  It also can help a great deal
on ccache-enabled CI systems like Travis-CI.  We build fixed
revisions of glslang a lot on Travis, so this will be a big help
with CI machine loading.
2018-07-06 12:12:09 -06:00
John Kessenich
b9e9e57f12
Merge pull request #1326 from mattparks/patch1
Allowed for LIB_TYPE to be set to switch between static and shared libs for glslang, SPIRV, and HLSL
2018-04-11 18:14:46 -06:00
John Kessenich
5d8d7882be Fix #1328: ENABLE_HLSL=OFF breaking build. 2018-04-05 19:52:38 -06:00
Matthew Albrecht
6c5f649ae8 Allowed for LIB_TYPE to be set to switch between static and shared libs for glslang, SPIRV, and HLSL 2018-03-30 09:32:03 -05:00
GregF
fb03a55e0f Only print legalization warning if optimizer disabled 2018-03-29 13:17:54 -06:00
Tim Diekmann
aab0001220 Set cmake-policy CMP0048 to NEW 2017-10-10 16:26:31 +02:00
John Kessenich
9cf5dfbdc7 Merge pull request #1063 from LoopDawg/remapper-error-cleanup
Remapper: make remapper robust against non-exiting error handlers
2017-09-23 06:32:02 -06:00
GregF
fd34f0e602 CMake changes for HLSL legalization
Cmake now looks for External/spirv-tools. If found, it links in
SPIRV-Tools-opt and SPVRemapper, and adds -DENABLE_OPT to build.
2017-09-21 17:01:47 -06:00
LoopDawg
8004d36528 Remapper: make remapper robust against non-exiting error handlers
Remapper errors are generally fatal: there has been some unexpected situation while
parsing the SPV binary, and there is no reasonable way to carry on.  The
errorHandler() function is called in this case, which by default exits, but
it is possible to submit a handler which does not.  In that case the remapper would
carry on in a bad state.

This change ensures a graceful termination of the remap() function.

While a try {} catch {} construct would be the ideal and safe way to do this,
that's off limits for certain environments, so this tries to do the same thing
with explicit code, to catch all the bailout paths.
2017-09-20 15:19:43 -06:00
d3x0r
f8f494ff14 Add option to skip installation
As a static target, when included in other cmake projects, it is not needed to install these libraries and headers as part of this build, and just need to link to this.
2017-07-04 05:54:57 -07:00
David Seifert
22afc38b55 Modernise CMake #2
This reverts commit cfc69d95af.
* Change CMAKE_INSTALL_PREFIX default on Windows in order
  to prevent permission denied errors when trying to install
  to "Program Files".
2017-04-29 11:23:15 +02:00
John Kessenich
cfc69d95af Revert "Modernise CMake" 2017-04-28 22:04:24 -06:00