[libcxx-commits] [PATCH] D113663: [libcxxabi/runtimes] Set LLVM_HOST_TRIPLE in runtimes build

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 11 22:31:55 PST 2021


phosek added inline comments.


================
Comment at: runtimes/CMakeLists.txt:116-121
 if (NOT LLVM_DEFAULT_TARGET_TRIPLE)
-  include(GetHostTriple)
   get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE)
+  set(LLVM_HOST_TRIPLE ${LLVM_DEFAULT_TARGET_TRIPLE})
+else()
+  get_host_triple(LLVM_HOST_TRIPLE)
 endif()
----------------
phosek wrote:
> We can simplify this by getting the host triple unconditionally.
In `llvm/CMakeLists.txt`, we cache `LLVM_DEFAULT_TARGET_TRIPLE` and use `LLVM_HOST_TRIPLE` as the default value, see https://github.com/llvm/llvm-project/blob/2ca45adf24d8ede45b9f600d13a4b4f7005e13af/llvm/CMakeLists.txt#L707. We could use the same approach here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113663/new/

https://reviews.llvm.org/D113663



More information about the libcxx-commits mailing list