-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[flang-rt] replace the triple dir to 'aix' for flang-rt to be consistent with clang on AIX. #130875
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
The snippet was copied from llvm-project/compiler-rt/cmake/Modules/CompilerRTUtils.cmake Lines 463 to 508 in 665299e
|
Actually, |
How so? What is stopping someone to set |
You are right. We do call I think the comment in
On AIX, When it is ON, we have which is exactly the opposite of what the flang-rt has. If the behavior on AIX is correct, flang-rt is actually have |
The cases of LLVM_ENABLE_PER_TARGET_RUNTIME_DIR were swapped. Noticed by @DanielCChen in #130875. Thanks!
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.
You are correct, fixed in 13261e8.
As the comment mentioned, flang-rt only uses the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON scheme and ignores the setting. See #110217 (comment) for the decision.
I am LGTM-ing this low-impact PR in order to get it working on AIX even though I think there is something more profound going on. It can be cleaned up some other time.
@@ -118,6 +118,9 @@ function (get_toolchain_arch_dirname outvar) | |||
set(target "amdgcn-amd-amdhsa") | |||
elseif("${arch}" MATCHES "^nvptx") | |||
set(target "nvptx64-nvidia-cuda") | |||
elseif(UNIX AND CMAKE_SYSTEM_NAME MATCHES "AIX") | |||
# Put at lib/aix to be consistent with clang on AIX. |
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.
Nit: "Put at" → "Use"
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.
Thanks. Will fix.
Thanks for the review! |
Not planning to implement support for honoring Consider that there already an exception for Apple:
Consider using os_dirname instead of modifying get_toolchain_arch_dirname .
|
…ent with clang on AIX.
558a64c
to
0644e33
Compare
…tead of changing get_toolchain_arch_dirname.
Good Idea! Will change to it. |
The cases of LLVM_ENABLE_PER_TARGET_RUNTIME_DIR were swapped. Noticed by @DanielCChen in llvm#130875. Thanks!
This change is to put
libflang_rt.runtime.a
intobuild/lib/clang/21/lib/aix/libflang_rt.runtime.a
, which is consistent with clang on AIX.