[PATCH] D142404: [docs] Prefer setting LLVM_HOST_TRIPLE instead of LLVM_DEFAULT_TARGET_TRIPLE and LLVM_TARGET_ARCH

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 15:28:09 PST 2023


phosek added a comment.

Since we're already on this topic, in D137451 <https://reviews.llvm.org/D137451> it was also brought up that having both `LLVM_DEFAULT_TARGET_TRIPLE` and `LLVM_TARGET_TRIPLE` is confusing and that perhaps we should only have one (presumably the latter).

In runtimes, we currently use `LLVM_DEFAULT_TARGET_TRIPLE` to construct the installation path but that's a ongoing source of issues. Neither `LLVM_HOST_TRIPLE` nor `LLVM_TARGET_TRIPLE` seem like the right replacement, since those variables are exported in `LLVMConfig.cmake` but in the runtimes build (which uses `LLVMConfig.cmake`) we need to set the triple based on the host we're compiling runtimes for, not based on the host we compiled LLVM for.

The solution I came up with in D137451 <https://reviews.llvm.org/D137451> is introducing a new variable `LLVM_RUNTIME_TRIPLE` to avoid conflict with any of the existing variables. Do you have any other suggestions?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142404



More information about the llvm-commits mailing list