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 | 2ef575d4fb723ef7b38eac031b8fe7d2aaa011c5 (patch) | |
tree | 1cc586bc58a2c84cc9a59916ee1efcffeb242f24 /CMakeLists.txt | |
parent | a917419dd962fed0a36717eb478cc05b4cf3a666 (diff) |
[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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e3d97c..505cbfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,6 +275,7 @@ macro(add_target_flags_if condition var) if (${condition}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${var}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${var}") + list(APPEND LIBCXXABI_COMPILE_FLAGS ${var}) list(APPEND LIBCXXABI_LINK_FLAGS ${var}) endif() endmacro() @@ -287,9 +288,9 @@ set(LIBCXXABI_LINK_FLAGS "") # Configure target flags add_target_flags_if(LIBCXXABI_BUILD_32_BITS "-m32") add_target_flags_if(LIBCXXABI_TARGET_TRIPLE - "-target ${LIBCXXABI_TARGET_TRIPLE}") + "--target=${LIBCXXABI_TARGET_TRIPLE}") add_target_flags_if(LIBCXXABI_GCC_TOOLCHAIN - "-gcc-toolchain ${LIBCXXABI_GCC_TOOLCHAIN}") + "--gcc-toolchain=${LIBCXXABI_GCC_TOOLCHAIN}") add_target_flags_if(LIBCXXABI_SYSROOT "--sysroot=${LIBCXXABI_SYSROOT}") |