Revert "[CMake] Use LLVM_TARGET_TRIPLE in runtimes"
This reverts commit bec8a372fc0db95852748691c0f4933044026b25.
This causes many of these errors to appear when rebuilding runtimes part
of fuchsia's toolchain:
ld.lld: error:
/usr/local/google/home/paulkirth/llvm-upstream/build/lib/x86_64-unknown-linux-gnu/libunwind.a(libunwind.cpp.o)
is incompatible with elf64-x86-64
This can be reproduced by making a complete toolchain, saving any source
file with no changes, then rerunning ninja distribution.
NOKEYCHECK=True
GitOrigin-RevId: 96d63993dd3698bbf2d6a83c035cd05faed7317b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a626af6..5c54788 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,8 +115,8 @@
set(LIBUNWIND_STATIC_OUTPUT_NAME "unwind" CACHE STRING "Output name for the static libunwind runtime library.")
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
- set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_TARGET_TRIPLE})
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_TARGET_TRIPLE} CACHE PATH
+ set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libunwind libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index aa5f92f..0a09553 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -29,7 +29,7 @@
if (CMAKE_CXX_COMPILER_TARGET)
serialize_lit_param(target_triple "\"${CMAKE_CXX_COMPILER_TARGET}\"")
else()
- serialize_lit_param(target_triple "\"${LLVM_TARGET_TRIPLE}\"")
+ serialize_lit_param(target_triple "\"${LLVM_DEFAULT_TARGET_TRIPLE}\"")
endif()
foreach(param IN LISTS LIBUNWIND_TEST_PARAMS)