CMake: Improve default value of COMPILER_RT_LIBDIR_OS on non-Mac Posix#4903
CMake: Improve default value of COMPILER_RT_LIBDIR_OS on non-Mac Posix#4903kinke wants to merge 4 commits intoldc-developers:masterfrom
Conversation
dd4e1c0 to
3a851d6
Compare
.github/workflows/main.yml
Outdated
| arch: armv7a | ||
| android_x86_arch: i686 | ||
| extra_cmake_flags: >- | ||
| -DCOMPILER_RT_LIBDIR_OS=linux |
There was a problem hiding this comment.
Our Android LLVM binaries have been cross-compiled on Linux, so not sure if it should always be linux (not android) on Android in general (as CMake special case), or whether this is just a side-effect of cross-compiling LLVM incl. compiler-rt.
There was a problem hiding this comment.
Using linux for android is intended, cross-compiling notwithstanding https://github.com/llvm/llvm-project/blob/5c8ba28c751bf0e7cb5c3ac9d223acba4cefc739/compiler-rt/cmake/base-config-ix.cmake#L98-L102
There was a problem hiding this comment.
Ah nice, thx for checking!
By preferring the LLVM host target triple (instead of hardcoding a Linux x86_64 glibc one), and falling back to the OS name alone if that directory exists.
3a851d6 to
cf624b2
Compare
| } else if (triple.isAndroid()) { | ||
| osNameCandidates.emplace_back("linux"); | ||
| } else { | ||
| osNameCandidates.emplace_back(triple.str()); |
There was a problem hiding this comment.
This seems to be required for the FreeBSD LLVM 19 port at least.
Not just in CMake.
And the arch filename part.
5439464 to
92c8b5f
Compare
|
Relevant changes cherry-picked to #4665. |
By preferring the LLVM host target triple (instead of hardcoding a Linux x86_64 glibc one), and falling back to the OS name alone if that directory exists.