-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[LLVM] Replace use of LLVM_RUNTIMES_TARGET
with LLVM_DEFAULT_TARGET_TRIPLE
#136208
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
@llvm/pr-subscribers-libc Author: Joseph Huber (jhuber6) ChangesSummary: Full diff: https://github.com/llvm/llvm-project/pull/136208.diff 1 Files Affected:
diff --git a/libc/cmake/modules/LLVMLibCArchitectures.cmake b/libc/cmake/modules/LLVMLibCArchitectures.cmake
index 62f3a2e3bdb59..d2046d9270063 100644
--- a/libc/cmake/modules/LLVMLibCArchitectures.cmake
+++ b/libc/cmake/modules/LLVMLibCArchitectures.cmake
@@ -211,6 +211,12 @@ if(explicit_target_triple AND
"GCC target triple (${libc_compiler_triple}) and the explicity "
"specified target triple (${explicit_target_triple}) do not match.")
else()
+ # Make sure we don't include any multilib specifiers.
+ string(FIND "${explicit_target_triple}" "+" plus_pos)
+ if(NOT plus_pos EQUAL -1)
+ string(SUBSTRING "${explicit_target_triple}" 0 ${plus_pos} explicit_target_triple)
+ endif()
+
list(APPEND
LIBC_COMPILE_OPTIONS_DEFAULT "--target=${explicit_target_triple}")
endif()
|
This shouldn't happen, what's your build configuration? |
Something like this, I couldn't figure out how it expected it to work. If I just tried doing it any other way it would complain that the target didn't exist. |
This looks correct but I suspect there might be a bug somewhere in the runtimes implementation since we shouldn't be passing the |
Here's the full script I was using if it helps https://gist.github.com/jhuber6/91177b9ee4c11ae570f5bcc490271db7. I'm interested in making AMD's ROCm build move towards this instead of separate standalone builds for debugging and other support. |
@petrhosek Is there also an expected way to access the multilib dir? Like, if I have |
The issue is that we started using |
That was my first question on the other PR, but you said to fix it in runtimes. I can do that. |
LLVM_RUNTIMES_TARGET
with LLVM_DEFAULT_TARGET_TRIPLE
I get this error from the bot. Any clue what the intent of this check is...?
|
Summary: The multilib builds pass `+name` to the runtime target. We were using this as a strict triple and passing it to the compiler. Parse out the triple portion in this case.
I just turned that error into a warning, the problem is that GCC and LLVM set the triple slightly different and we can't pass |
Thanks for doing this cleanup! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/20393 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/147/builds/19403 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/171/builds/20159 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/179/builds/20279 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/93/builds/19937 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/43/builds/19931 Here is the relevant piece of the build log for the reference
|
This made things unhappy, I think because the LLVM default triple is always defined while the previous one was only defined for these runtime crossbuilds? We could make a new variable and keep them distinct or something. |
…T_TRIPLE` (llvm#136208) Summary: For purposes of determining the triple, it's more correct to use `LLVM_DEFAULT_TARGET_TRIPLE`.
…LT_TARGET_TRIPLE` (llvm#136208)" This reverts commit 2e145f1. Somehow causes some static assertions to fail?
…T_TRIPLE` (llvm#136208) Summary: For purposes of determining the triple, it's more correct to use `LLVM_DEFAULT_TARGET_TRIPLE`.
…LT_TARGET_TRIPLE` (llvm#136208)" This reverts commit 2e145f1. Somehow causes some static assertions to fail?
…T_TRIPLE` (llvm#136208) Summary: For purposes of determining the triple, it's more correct to use `LLVM_DEFAULT_TARGET_TRIPLE`.
…LT_TARGET_TRIPLE` (llvm#136208)" This reverts commit 2e145f1. Somehow causes some static assertions to fail?
Summary:
For purposes of determining the triple, it's more correct to use
LLVM_DEFAULT_TARGET_TRIPLE
.