[PATCH] D117263: [CMake] Support runtimes targets without specifying triple
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 17:56:29 PST 2022
smeenai added a comment.
I don't understand the motivation for this change.
The Darwin compiler-rt support works by overriding the `OSX_ARCHITECTURES` target property (which makes CMake pass `-arch` flags), and emptying `CMAKE_OSX_DEPLOYMENT_TARGET` and passing its own `-m*-version-min` flags. The Clang driver seems to have some special support where if your triple is `x86_64-apple-darwin` (I assume other architectures would work too, but I haven't checked), it'll override the architecture and the deployment target based on the `-arch` and `-m*-version-min` flags, which means the `-target` is effectively a no-op in this case (besides enabling the overwriting based on those other flags). The result is that you can add `x86_64-apple-darwin` to your `LLVM_BUILTIN_TARGETS` and `LLVM_RUNTIME_TARGETS`, and then control the actual platforms and architectures via the appropriate CMake variables for that target (`COMPILER_RT_ENABLE_<PLATFORM>`, `DARWIN_<PLATFORM>_BUILTIN_ARCHS`, etc.), which is what I set up in D86313 <https://reviews.llvm.org/D86313>, and what we use internally. Does that not work for your use case?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117263/new/
https://reviews.llvm.org/D117263
More information about the llvm-commits
mailing list