[compiler-rt] r285477 - builtins: ensure that VISIBILITY_HIDDEN is defined properly
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 16:19:04 PDT 2016
Author: compnerd
Date: Fri Oct 28 18:19:03 2016
New Revision: 285477
URL: http://llvm.org/viewvc/llvm-project?rev=285477&view=rev
Log:
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.
Modified:
compiler-rt/trunk/lib/builtins/CMakeLists.txt
Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=285477&r1=285476&r2=285477&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Fri Oct 28 18:19:03 2016
@@ -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 ()
More information about the llvm-commits
mailing list