[PATCH] D32068: [CMake][libcxx] Fix the --target and --gcc-toolchain flag handling
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 15 19:38:43 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL300409: [CMake][libcxx] Fix the --target and --gcc-toolchain flag handling (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D32068?vs=95259&id=95387#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32068
Files:
libcxx/trunk/CMakeLists.txt
libcxx/trunk/cmake/Modules/HandleCompilerRT.cmake
Index: libcxx/trunk/cmake/Modules/HandleCompilerRT.cmake
===================================================================
--- libcxx/trunk/cmake/Modules/HandleCompilerRT.cmake
+++ libcxx/trunk/cmake/Modules/HandleCompilerRT.cmake
@@ -3,7 +3,7 @@
message(FATAL_ERROR "LIBCXX_COMPILE_FLAGS must be defined when using this function")
endif()
set(dest "" PARENT_SCOPE)
- set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${TARGET_TRIPLE} ${LIBCXX_COMPILE_FLAGS}
+ set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBCXX_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}")
Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -370,9 +370,9 @@
# 'config-ix' use them during feature checks. It also adds them to both
# 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS'
add_target_flags_if(LIBCXX_BUILD_32_BITS "-m32")
-add_target_flags_if(LIBCXX_TARGET_TRIPLE "-target ${LIBCXX_TARGET_TRIPLE}")
+add_target_flags_if(LIBCXX_TARGET_TRIPLE "--target=${LIBCXX_TARGET_TRIPLE}")
add_target_flags_if(LIBCXX_SYSROOT "--sysroot=${LIBCXX_SYSROOT}")
-add_target_flags_if(LIBCXX_GCC_TOOLCHAIN "-gcc-toolchain ${LIBCXX_GCC_TOOLCHAIN}")
+add_target_flags_if(LIBCXX_GCC_TOOLCHAIN "--gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}")
if (LIBCXX_TARGET_TRIPLE)
set(TARGET_TRIPLE "${LIBCXX_TARGET_TRIPLE}")
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32068.95387.patch
Type: text/x-patch
Size: 1568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170416/ab00e062/attachment.bin>
More information about the llvm-commits
mailing list