-
-
Notifications
You must be signed in to change notification settings - Fork 271
CMake: Improve default value of COMPILER_RT_LIBDIR_OS on non-Mac Posix #4903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.