[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: [PATCH] D17735: [libcxxabi] PR26778 Fix tests when CXX="ccache clang++"
From: don hinton via cfe-commits <cfe-commits () lists ! llvm ! org>
Date: 2016-02-29 21:50:12
Message-ID: differential-rev-PHID-DREV-7yaelg5ifk76dyibnc2b-req () reviews ! llvm ! org
[Download RAW message or body]
hintonda created this revision.
hintonda added a reviewer: mclow.lists.
hintonda added a subscriber: cfe-commits.
If you use ccache to build libcxxabi by setting CXX="ccache
clang++", check-libcxxabi will fail since LIBCXXABI_COMPILER will be
set to "ccache".
We can't just include CMAKE_CXX_COMPILER_ARG1 because of a python
parsing issue, so the best we can do right now is to use
CMAKE_CXX_COMPILER_ARG1 if it exists, and CMAKE_CXX_COMPILER if it
doesn't.
http://reviews.llvm.org/D17735
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -177,7 +177,14 @@
# Configure compiler.
include(config-ix)
-set(LIBCXXABI_COMPILER ${CMAKE_CXX_COMPILER})
+# When ccache is used, the actual compiler will be in arg1. Solves
+# a python parsing issue in CXXCompiler() where parameters with spaces are
+# treated as seperate parameters.
+if(CMAKE_CXX_COMPILER_ARG1)
+ string(STRIP ${CMAKE_CXX_COMPILER_ARG1} LIBCXXABI_COMPILER )
+else()
+ set(LIBCXXABI_COMPILER ${CMAKE_CXX_COMPILER})
+endif()
set(LIBCXXABI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBCXXABI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
["D17735.49420.patch" (text/x-patch)]
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -177,7 +177,14 @@
# Configure compiler.
include(config-ix)
-set(LIBCXXABI_COMPILER ${CMAKE_CXX_COMPILER})
+# When ccache is used, the actual compiler will be in arg1. Solves
+# a python parsing issue in CXXCompiler() where parameters with spaces are
+# treated as seperate parameters.
+if(CMAKE_CXX_COMPILER_ARG1)
+ string(STRIP ${CMAKE_CXX_COMPILER_ARG1} LIBCXXABI_COMPILER )
+else()
+ set(LIBCXXABI_COMPILER ${CMAKE_CXX_COMPILER})
+endif()
set(LIBCXXABI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LIBCXXABI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
[Attachment #4 (text/plain)]
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic