-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[Runtimes][CMake] Add CMake option to enable execute-only code generation on AArch64 #143698
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
|
@ldionne |
That's because we don't yet have a runtimes-specific variables but we expect to have more soon (see for example #134893 which introduces |
Thanks for the explanation, I updated the name. |
|
Gentle ping. I would like to get this approved and merged by the end of the month, before the LLVM 21 release. Can you review, or add other relevant reviewers, please? |
|
Ping |
|
Ping @ldionne @petrhosek |
1 similar comment
|
Ping @ldionne @petrhosek |
|
Ping |
|
Ping @ldionne @petrhosek |
1 similar comment
|
Ping @ldionne @petrhosek |
ldionne
left a comment
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.
I really dislike that we're setting CMAKE_CXX_FLAGS explicitly here, but that is something we can clean up when we have a better way to share common flags across runtimes.
I agree, we shouldn't be directly modifying |
…tion on AArch64 Based on the discussion in https://discourse.llvm.org/t/rfc-execute-only-code-support-for-runtime-libraries-on-aarch64/86180 a single, global configuration option should be used to enable execute-only code generation for the runtime libraries. The new option `LLVM_EXECUTE_ONLY_CODE` adds the `-mexecute-only` flag to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`, which simplifies the library-level configuration needed for the runtime libraries. Project-specific changes are still needed to handle assembly sources, e.g. in compiler-rt and libunwind.
9570649 to
c9e9a25
Compare
|
Thanks for taking a look, and approving this PR! I've rebased to current main to make sure everything works, and I'll merge this at the end of the week. |
Based on the discussion in https://discourse.llvm.org/t/rfc-execute-only-code-support-for-runtime-libraries-on-aarch64/86180 a single, global configuration option should be used to enable execute-only code generation for the runtime libraries. The new option
RUNTIMES_EXECUTE_ONLY_CODEadds the-mexecute-onlyflag toCMAKE_C_FLAGSandCMAKE_CXX_FLAGS, which simplifies the library-level configuration needed for the runtime libraries.Project-specific changes are still needed to handle assembly sources, e.g. in compiler-rt and libunwind.