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.

llvm-svn: 285477
This commit is contained in:
Saleem Abdulrasool 2016-10-28 23:19:03 +00:00
parent 4e9c1e3a79
commit 2594717436
1 changed files with 6 additions and 0 deletions

View File

@ -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 ()