diff options
author | Petr Hosek <phosek@chromium.org> | 2017-04-16 06:08:34 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-04-16 06:08:34 +0000 |
commit | d3a3fb839132828d1001c754a34216634e501fe5 (patch) | |
tree | 6c6bcb09a0419450f3be35200e22717c5eec1f25 /libcxxabi/cmake | |
parent | 2bbb4ecd94dff50cf9fd2ebc724685d80661bf2e (diff) | |
download | llvm-d3a3fb839132828d1001c754a34216634e501fe5.tar.gz |
[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
llvm-svn: 300418
Diffstat (limited to 'libcxxabi/cmake')
-rw-r--r-- | libcxxabi/cmake/Modules/HandleCompilerRT.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/cmake/Modules/HandleCompilerRT.cmake b/libcxxabi/cmake/Modules/HandleCompilerRT.cmake index 557c69d97152..395c21ace665 100644 --- a/libcxxabi/cmake/Modules/HandleCompilerRT.cmake +++ b/libcxxabi/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}") |