[libcxx-commits] [PATCH] D138864: Setting the LLVM_TARGET_TRIPLE macro based on the LLVM_DEFAULT_TARGET_TRIPLE

Paul Robinson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 13 10:56:30 PST 2022


probinson added a comment.

In D138864#3989941 <https://reviews.llvm.org/D138864#3989941>, @daltenty wrote:

> I believe @phosek documents the intended semantic here in https://reviews.llvm.org/D137451:
>
>> LLVM_DEFAULT_TARGET_TRIPLE is the default value that's used by tools like clang or llc when you don't explicitly specify --target or --triple. LLVM_TARGET_TRIPLE is the target triple we're building for. LLVM_DEFAULT_TARGET_TRIPLE is used as a the default value for LLVM_TARGET_TRIPLE but they're independent.

If I rephrase it this way, does it mean the same thing?
`LLVM_DEFAULT_TARGET_TRIPLE` is the default for `--target` or `--triple`-like options in the tools we are building.
`LLVM_TARGET_TRIPLE` describes the environment where we expect those tools to run (and could be passed to the compiler being used to build those tools).

The lit tests, which I'm dealing with a great deal these days, don't seem to look at those parameters the same way. Each projects's `lit.site.cfg.py.in` file sets `config.target_triple = "@LLVM_TARGET_TRIPLE@"` (except for a couple of outliers that don't set target_triple at all, and maybe the runtimes which hide their lit config files in unobvious places). Now, I'm willing to believe that the CMake configuration parameters have evolved without lit following along, but if we're trying to come to some conclusion about What It All Means, then we need to make sure that lit keeps up.


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

https://reviews.llvm.org/D138864



More information about the libcxx-commits mailing list