[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)
YunQiang Su via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 19 17:04:32 PDT 2024
================
@@ -28,6 +28,19 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
if (NOT LLVM_RUNTIMES_BUILD)
load_llvm_config()
endif()
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
----------------
wzssyqa wrote:
With my patch, `libclang_rt.builtin` has been installed to per_target runtime dir.
I don't think that this one is needed.
And `if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is not needed here: it is just set the triple.
If `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=off`, the libraries will still install to non-per-target dir.
And `if(NOT APPLE)` is not needed either.
```
$ ./bin/clang --target=air64-apple-ios16.0 -print-target-triple
air64-apple-ios16.0
$ ./bin/clang --target=arm64-apple-darwin23.4.0 -print-target-triple
arm64-apple-darwin23.4.0
```
https://github.com/llvm/llvm-project/pull/89425
More information about the cfe-commits
mailing list