summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/LLVM.cmake4
-rw-r--r--source/slang-glsl-module/CMakeLists.txt9
-rw-r--r--source/slang-glslang/CMakeLists.txt6
3 files changed, 18 insertions, 1 deletions
diff --git a/cmake/LLVM.cmake b/cmake/LLVM.cmake
index d707d3605..0bbd5b133 100644
--- a/cmake/LLVM.cmake
+++ b/cmake/LLVM.cmake
@@ -92,6 +92,10 @@ function(fetch_or_build_slang_llvm)
)
# If we don't include this, then the symbols in the LLVM linked here may
# conflict with those of other LLVMs linked at runtime, for instance in mesa.
+ set_target_properties(
+ slang-llvm
+ PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON
+ )
add_supported_cxx_linker_flags(
slang-llvm
PRIVATE
diff --git a/source/slang-glsl-module/CMakeLists.txt b/source/slang-glsl-module/CMakeLists.txt
index 21e7e0683..cf7c12edd 100644
--- a/source/slang-glsl-module/CMakeLists.txt
+++ b/source/slang-glsl-module/CMakeLists.txt
@@ -26,3 +26,12 @@ slang_add_target(
INCLUDE_DIRECTORIES_PRIVATE ${glsl_module_generated_header_dir}
INSTALL
)
+set_target_properties(
+ slang-glsl-module
+ PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON
+)
+add_supported_cxx_linker_flags(
+ slang-glsl-module
+ PRIVATE
+ "-Wl,--exclude-libs,ALL"
+)
diff --git a/source/slang-glslang/CMakeLists.txt b/source/slang-glslang/CMakeLists.txt
index e1ced542d..b48be641c 100644
--- a/source/slang-glslang/CMakeLists.txt
+++ b/source/slang-glslang/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Our wrapper for glslang
+# Our wrapper for glslang
#
if(SLANG_ENABLE_SLANG_GLSLANG)
slang_add_target(
@@ -14,6 +14,10 @@ if(SLANG_ENABLE_SLANG_GLSLANG)
)
# Our only interface is through what we define in source/slang-glslang, in the
# interests of hygiene, hide anything else we link in.
+ set_target_properties(
+ slang-glslang
+ PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON
+ )
add_supported_cxx_linker_flags(
slang-glslang
PRIVATE