[PATCH] D32071: [CMake][libunwind] Fix the -target and -gcc-toolchain flag handling
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 15 23:21:32 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL300419: [CMake][libunwind] Fix the -target and -gcc-toolchain flag handling (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D32071?vs=95262&id=95392#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32071
Files:
libunwind/trunk/CMakeLists.txt
libunwind/trunk/cmake/Modules/HandleCompilerRT.cmake
Index: libunwind/trunk/cmake/Modules/HandleCompilerRT.cmake
===================================================================
--- libunwind/trunk/cmake/Modules/HandleCompilerRT.cmake
+++ libunwind/trunk/cmake/Modules/HandleCompilerRT.cmake
@@ -3,7 +3,7 @@
message(FATAL_ERROR "LIBUNWIND_COMPILE_FLAGS must be defined when using this function")
endif()
set(dest "" PARENT_SCOPE)
- set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${TARGET_TRIPLE} ${LIBUNWIND_COMPILE_FLAGS}
+ set(CLANG_COMMAND ${CMAKE_CXX_COMPILER} ${LIBUNWIND_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: libunwind/trunk/CMakeLists.txt
===================================================================
--- libunwind/trunk/CMakeLists.txt
+++ libunwind/trunk/CMakeLists.txt
@@ -180,16 +180,16 @@
if (${condition})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${var}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${var}")
- list(APPEND LINUNWIND_COMPILE_FLAGS ${var})
+ list(APPEND LIBUNWIND_COMPILE_FLAGS ${var})
list(APPEND LIBUNWIND_LINK_FLAGS ${var})
endif()
endmacro()
add_target_flags_if(LIBUNWIND_BUILD_32_BITS "-m32")
add_target_flags_if(LIBUNWIND_TARGET_TRIPLE
- "-target ${LIBUNWIND_TARGET_TRIPLE}")
+ "--target=${LIBUNWIND_TARGET_TRIPLE}")
add_target_flags_if(LIBUNWIND_GCC_TOOLCHAIN
- "-gcc-toolchain ${LIBUNWIND_GCC_TOOLCHAIN}")
+ "--gcc-toolchain=${LIBUNWIND_GCC_TOOLCHAIN}")
add_target_flags_if(LIBUNWIND_SYSROOT
"--sysroot=${LIBUNWIND_SYSROOT}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32071.95392.patch
Type: text/x-patch
Size: 1684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170416/f91e4aee/attachment.bin>
More information about the llvm-commits
mailing list