[libcxx-commits] [PATCH] D58084: [CMake] Avoid passing -rtlib=compiler-rt when using compiler-rt

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 11 16:10:14 PST 2019


phosek created this revision.
phosek added reviewers: ldionne, EricWF, smeenai.
Herald added subscribers: libcxx-commits, christof, mgorny, dberris.
Herald added a project: libc++.

We build libc++ and libc++abi with -nostdlib, so this is not needed
and results in 'argument unused during compilation' warning which
breaks the build when using -Werror.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D58084

Files:
  libcxx/CMakeLists.txt
  libcxxabi/CMakeLists.txt


Index: libcxxabi/CMakeLists.txt
===================================================================
--- libcxxabi/CMakeLists.txt
+++ libcxxabi/CMakeLists.txt
@@ -262,10 +262,6 @@
   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)
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -485,10 +485,6 @@
 # Configure compiler.
 include(config-ix)
 
-if (LIBCXX_USE_COMPILER_RT)
-  list(APPEND LIBCXX_LINK_FLAGS "-rtlib=compiler-rt")
-endif()
-
 # Configure coverage options.
 if (LIBCXX_GENERATE_COVERAGE)
   include(CodeCoverage)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58084.186359.patch
Type: text/x-patch
Size: 902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190212/d1cfbabf/attachment.bin>


More information about the libcxx-commits mailing list