[libcxx-commits] [libcxxabi] r353786 - [CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt

Petr Hosek via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 11 17:35:29 PST 2019


Author: phosek
Date: Mon Feb 11 17:35:29 2019
New Revision: 353786

URL: http://llvm.org/viewvc/llvm-project?rev=353786&view=rev
Log:
[CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt

We build libc++ and libc++abi with -nodefaultlibs, so -rtlib=compiler-rt
has no effect and results in an 'argument unused during compilation'
warning which breaks the build when using -Werror. We can therefore drop
-rtlib=compiler-rt without any functional change; note that the actual
compiler-rt linking is handled by HandleCompilerRT.

Differential Revision: https://reviews.llvm.org/D58084

Modified:
    libcxxabi/trunk/CMakeLists.txt

Modified: libcxxabi/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=353786&r1=353785&r2=353786&view=diff
==============================================================================
--- libcxxabi/trunk/CMakeLists.txt (original)
+++ libcxxabi/trunk/CMakeLists.txt Mon Feb 11 17:35:29 2019
@@ -262,10 +262,6 @@ if (LIBCXXABI_HAS_NOSTDINCXX_FLAG)
   string(REPLACE "-stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 endif()
 
-if (LIBCXXABI_USE_COMPILER_RT)
-  list(APPEND LIBCXXABI_LINK_FLAGS "-rtlib=compiler-rt")
-endif()
-
 # Let the library headers know they are currently being used to build the
 # library.
 add_definitions(-D_LIBCXXABI_BUILDING_LIBRARY)




More information about the libcxx-commits mailing list