diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-10-28 23:19:03 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-10-28 23:19:03 +0000 |
commit | 0a41fa9506ba8d3be4118e5a11d2c42d9154ec29 (patch) | |
tree | 10fb72ab296845105acd56aa60568ff7cb941fbb /lib/builtins/CMakeLists.txt | |
parent | 68e1532492f9b3fce0e9024f3c31411105965b11 (diff) |
builtins: ensure that VISIBILITY_HIDDEN is defined properly
The CMake build system had missed this macro as part of the build of the
builtins. This would result in the builtins exporting symbols which are
implemented in assembly with global visibility. Ensure that the assembly
optimized routines are given the same visibility as the C routines.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/CMakeLists.txt')
-rw-r--r-- | lib/builtins/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt index 25b77300f..5cbc1cb28 100644 --- a/lib/builtins/CMakeLists.txt +++ b/lib/builtins/CMakeLists.txt @@ -426,6 +426,7 @@ if (APPLE) darwin_add_builtin_libraries(${BUILTIN_SUPPORTED_OS}) else () set(BUILTIN_CFLAGS "") + append_list_if(COMPILER_RT_HAS_STD_C99_FLAG -std=gnu99 BUILTIN_CFLAGS) # These flags would normally be added to CMAKE_C_FLAGS by the llvm @@ -439,6 +440,10 @@ else () endif() endif() + set(BUILTIN_DEFS "") + + append_list_if(COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG VISIBILITY_HIDDEN BUILTIN_DEFS) + foreach (arch ${BUILTIN_SUPPORTED_ARCH}) if (CAN_TARGET_${arch}) # Filter out generic versions of routines that are re-implemented in @@ -462,6 +467,7 @@ else () STATIC ARCHS ${arch} SOURCES ${${arch}_SOURCES} + DEFS ${BUILTIN_DEFS} CFLAGS ${BUILTIN_CFLAGS} PARENT_TARGET builtins) endif () |