[PATCH] D101581: [CMake][compiler-rt] avoid conflict with builtin check_linker_flag
Steven Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 29 15:09:39 PDT 2021
steven_wu created this revision.
steven_wu added reviewers: radford, JDevlieghere, ruiu, arphaman.
Herald added subscribers: ributzka, mgorny, dberris.
steven_wu requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Rename `check_linker_flag` in compiler_rt to avoid conflict. Follow up
as the fix in D100901 <https://reviews.llvm.org/D100901>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101581
Files:
compiler-rt/cmake/config-ix.cmake
Index: compiler-rt/cmake/config-ix.cmake
===================================================================
--- compiler-rt/cmake/config-ix.cmake
+++ compiler-rt/cmake/config-ix.cmake
@@ -6,7 +6,7 @@
include(CheckSymbolExists)
include(TestBigEndian)
-function(check_linker_flag flag out_var)
+function(compiler_rt_check_linker_flag flag out_var)
cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}")
check_cxx_compiler_flag("" ${out_var})
@@ -156,11 +156,11 @@
check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.
-check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
-check_linker_flag("-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
+compiler_rt_check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
+compiler_rt_check_linker_flag("-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
set(VERS_COMPAT_OPTION "-Wl,-z,gnu-version-script-compat")
-check_linker_flag("${VERS_COMPAT_OPTION}" COMPILER_RT_HAS_GNU_VERSION_SCRIPT_COMPAT)
+compiler_rt_check_linker_flag("${VERS_COMPAT_OPTION}" COMPILER_RT_HAS_GNU_VERSION_SCRIPT_COMPAT)
set(DUMMY_VERS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/dummy.vers)
file(WRITE ${DUMMY_VERS} "{};")
@@ -170,10 +170,10 @@
# -z gnu-version-script-compat.
string(APPEND VERS_OPTION " ${VERS_COMPAT_OPTION}")
endif()
-check_linker_flag("${VERS_OPTION}" COMPILER_RT_HAS_VERSION_SCRIPT)
+compiler_rt_check_linker_flag("${VERS_OPTION}" COMPILER_RT_HAS_VERSION_SCRIPT)
if(ANDROID)
- check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
+ compiler_rt_check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
check_library_exists(log __android_log_write "" COMPILER_RT_HAS_LIBLOG)
endif()
@@ -437,7 +437,7 @@
-lc++
-lc++abi)
- check_linker_flag("-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION)
+ compiler_rt_check_linker_flag("-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION)
if(COMPILER_RT_HAS_APP_EXTENSION)
list(APPEND DARWIN_COMMON_LINK_FLAGS "-fapplication-extension")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101581.341674.patch
Type: text/x-patch
Size: 2074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210429/d41617e0/attachment.bin>
More information about the llvm-commits
mailing list