forked from OSchip/llvm-project
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:
parent
4e9c1e3a79
commit
2594717436
|
@ -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 ()
|
||||
|
|
Loading…
Reference in New Issue