[PATCH] D24809: [libcxx] [cmake] Strip possibly-inherited compiler flags in in-tree build only

Michał Górny via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 01:04:11 PDT 2016


This revision was automatically updated to reflect the committed changes.
mgorny marked an inline comment as done.
Closed by commit rL282475: [cmake] Strip possibly-inherited compiler flags in in-tree build only (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D24809?vs=72602&id=72611#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24809

Files:
  libcxx/trunk/CMakeLists.txt

Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -307,9 +307,12 @@
 
 include(HandleLibCXXABI) # Setup the ABI library flags
 
-# Remove flags that may have snuck in.
-remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG
-             -stdlib=libc++ -stdlib=libstdc++ -lc++abi -m32)
+if (NOT LIBCXX_STANDALONE_BUILD)
+  # Remove flags that may have snuck in.
+  remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG
+               -lc++abi -m32)
+endif()
+remove_flags(-stdlib=libc++ -stdlib=libstdc++)
 
 # FIXME(EricWF): See the FIXME on LIBCXX_ENABLE_PEDANTIC.
 # Remove the -pedantic flag and -Wno-pedantic and -pedantic-errors


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24809.72611.patch
Type: text/x-patch
Size: 727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160927/790a34fb/attachment.bin>


More information about the cfe-commits mailing list