[libcxx-commits] [PATCH] D117833: [compiler-rt][libunwind][runtimes] Recategorize `llvm_check_linker_flag` langs
John Ericson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 21 17:20:42 PST 2022
Ericson2314 updated this revision to Diff 402144.
Ericson2314 added a comment.
rebase on top of new version of D117537 <https://reviews.llvm.org/D117537>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117833/new/
https://reviews.llvm.org/D117833
Files:
compiler-rt/cmake/config-ix.cmake
libunwind/cmake/config-ix.cmake
runtimes/CMakeLists.txt
Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -110,7 +110,7 @@
# Check for -nostdlib++ first; if there's no C++ standard library yet,
# all check_cxx_compiler_flag commands will fail until we add -nostdlib++
# (or -nodefaultlibs).
-llvm_check_compiler_flag(C "-nostdlib++" LLVM_RUNTIMES_SUPPORT_NOSTDLIBXX_FLAG)
+llvm_check_compiler_flag(CXX "-nostdlib++" LLVM_RUNTIMES_SUPPORT_NOSTDLIBXX_FLAG)
if (LLVM_RUNTIMES_SUPPORT_NOSTDLIBXX_FLAG)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nostdlib++")
endif()
Index: libunwind/cmake/config-ix.cmake
===================================================================
--- libunwind/cmake/config-ix.cmake
+++ libunwind/cmake/config-ix.cmake
@@ -34,7 +34,7 @@
# required for the link to go through. We remove sanitizers from the
# configuration checks to avoid spurious link errors.
-llvm_check_compiler_flag(C "-nostdlib++" LIBUNWIND_SUPPORTS_NOSTDLIBXX_FLAG)
+llvm_check_compiler_flag(CXX "-nostdlib++" LIBUNWIND_SUPPORTS_NOSTDLIBXX_FLAG)
if (LIBUNWIND_SUPPORTS_NOSTDLIBXX_FLAG)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nostdlib++")
else()
Index: compiler-rt/cmake/config-ix.cmake
===================================================================
--- compiler-rt/cmake/config-ix.cmake
+++ compiler-rt/cmake/config-ix.cmake
@@ -165,12 +165,12 @@
check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.
-llvm_check_compiler_flag(CXX "-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
-llvm_check_compiler_flag(CXX "-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
+llvm_check_compiler_flag(C "-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
+llvm_check_compiler_flag(C "-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
set(VERS_COMPAT_OPTION "-Wl,-z,gnu-version-script-compat")
- llvm_check_compiler_flag(CXX "${VERS_COMPAT_OPTION}" COMPILER_RT_HAS_GNU_VERSION_SCRIPT_COMPAT)
+ llvm_check_compiler_flag(C "${VERS_COMPAT_OPTION}" COMPILER_RT_HAS_GNU_VERSION_SCRIPT_COMPAT)
endif()
set(DUMMY_VERS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/dummy.vers)
@@ -181,10 +181,10 @@
# -z gnu-version-script-compat.
string(APPEND VERS_OPTION " ${VERS_COMPAT_OPTION}")
endif()
-llvm_check_compiler_flag(CXX "${VERS_OPTION}" COMPILER_RT_HAS_VERSION_SCRIPT)
+llvm_check_compiler_flag(C "${VERS_OPTION}" COMPILER_RT_HAS_VERSION_SCRIPT)
if(ANDROID)
- llvm_check_compiler_flag(CXX "-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
+ llvm_check_compiler_flag(C "-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
check_library_exists(log __android_log_write "" COMPILER_RT_HAS_LIBLOG)
endif()
@@ -430,7 +430,7 @@
-lc++
-lc++abi)
- llvm_check_compiler_flag(CXX "-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION)
+ llvm_check_compiler_flag(C "-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: D117833.402144.patch
Type: text/x-patch
Size: 3074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220122/d570f2b3/attachment.bin>
More information about the libcxx-commits
mailing list