aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMichael Dusan <michael.dusan@gmail.com>2019-04-24 10:56:16 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-04-24 14:37:14 -0400
commit5de934810fda80dcf141fce57331ef9291a45abc (patch)
tree40912e4b476607f430a5a1f79d5ace32ca38c929 /CMakeLists.txt
parented419555229a6d93eb7b08950620f86641f44d92 (diff)
downloadzig-5de934810fda80dcf141fce57331ef9291a45abc.tar.gz
zig-5de934810fda80dcf141fce57331ef9291a45abc.zip
add -fvisibility-inlines-hidden
On macOS building with Xcode/clang the linker complains loudly when symbol visibility is inconsistent. This option syncs visibilty setting of both LLVM and Zig.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41aa75def2..5acf0d8c75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -192,7 +192,7 @@ else()
if(MSVC)
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -D_CRT_SECURE_NO_WARNINGS /w")
else()
- set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment")
+ set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Wno-comment")
if(MINGW)
set(ZIG_LLD_COMPILE_FLAGS "${ZIG_LLD_COMPILE_FLAGS} -D__STDC_FORMAT_MACROS -D__USE_MINGW_ANSI_STDIO -Wno-pedantic-ms-format")
endif()
@@ -6609,7 +6609,7 @@ endif()
if(MSVC)
set(EXE_CFLAGS "${EXE_CFLAGS}")
else()
- set(EXE_CFLAGS "${EXE_CFLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-exceptions -fno-rtti -Werror=strict-prototypes -Werror=old-style-definition -Werror=type-limits -Wno-missing-braces")
+ set(EXE_CFLAGS "${EXE_CFLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Werror=strict-prototypes -Werror=old-style-definition -Werror=type-limits -Wno-missing-braces")
if(MINGW)
set(EXE_CFLAGS "${EXE_CFLAGS} -D__USE_MINGW_ANSI_STDIO -Wno-pedantic-ms-format")
endif()