From 2ef575d4fb723ef7b38eac031b8fe7d2aaa011c5 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Sun, 16 Apr 2017 06:08:34 +0000 Subject: [CMake][libcxxabi] Fix the -target and -gcc-toolchain flag handling CMake has the problem with the single dash variant because of the space, so use the double dash with equal sign version. These flag need to be included in compile flags to propagate correctly. We also don't have to pass the target triple when checking for compiler-rt since that flag is already included in compile flags now. Differential Revision: https://reviews.llvm.org/D32069 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@300418 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/Modules/HandleCompilerRT.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/Modules/HandleCompilerRT.cmake b/cmake/Modules/HandleCompilerRT.cmake index 557c69d..395c21a 100644 --- a/cmake/Modules/HandleCompilerRT.cmake +++ b/cmake/Modules/HandleCompilerRT.cmake @@ -3,7 +3,7 @@ function(find_compiler_rt_library name dest) message(FATAL_ERROR "LIBCXXABI_COMPILE_FLAGS must be defined when using this function") endif() set(dest "" PARENT_SCOPE) - set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${TARGET_TRIPLE} ${LIBCXXABI_COMPILE_FLAGS} + set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXXABI_COMPILE_FLAGS} "--rtlib=compiler-rt" "--print-libgcc-file-name") if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_CXX_COMPILER_TARGET) list(APPEND CLANG_COMMAND "--target=${CMAKE_CXX_COMPILER_TARGET}") -- cgit v1.2.3