-
Notifications
You must be signed in to change notification settings - Fork 14k
[Driver] Fix Arm/AArch64 Link Argument tests #144582
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 openmp-offload-amdgpu-runtime-2 bot specifies default rtlib of compiler-rt, but default unwindlib of libgcc. Change the tests to accept that there may be `"--as-needed" "-lgcc_s" "--no-as-needed"` between `libclang_rt.builtins.a` and `-lc`. Relates to llvm#121830
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) ChangesThe openmp-offload-amdgpu-runtime-2 bot specifies default rtlib of compiler-rt, but default unwindlib of libgcc. Change the tests to accept that there may be Relates to #121830 Full diff: https://github.com/llvm/llvm-project/pull/144582.diff 2 Files Affected:
diff --git a/clang/test/Driver/aarch64-toolchain.c b/clang/test/Driver/aarch64-toolchain.c
index e12107fa2c506..327161b81d9f6 100644
--- a/clang/test/Driver/aarch64-toolchain.c
+++ b/clang/test/Driver/aarch64-toolchain.c
@@ -135,7 +135,8 @@
// AARCH64-BAREMETAL-COMPILER-RT: "{{.*}}crt0.o"
// AARCH64-BAREMETAL-COMPILER-RT: "{{.*}}clang_rt.crtbegin.o"
-// AARCH64-BAREMETAL-COMPILER-RT: "--start-group" "{{.*}}libclang_rt.builtins.a" "-lc" "-lgloss" "--end-group"
+// AARCH64-BAREMETAL-COMPILER-RT: "--start-group" "{{.*}}libclang_rt.builtins.a"
+// AARCH64-BAREMETAL-COMPILER-RT: "-lc" "-lgloss" "--end-group"
// AARCH64-BAREMETAL-COMPILER-RT: "{{.*}}clang_rt.crtend.o"
// RUN: %clang -### %s -fuse-ld= \
diff --git a/clang/test/Driver/arm-toolchain.c b/clang/test/Driver/arm-toolchain.c
index d4f9bf2aaf3d5..5368158cdeeda 100644
--- a/clang/test/Driver/arm-toolchain.c
+++ b/clang/test/Driver/arm-toolchain.c
@@ -136,7 +136,8 @@
// ARM-BAREMETAL-COMPILER-RT: "{{.*}}crt0.o"
// ARM-BAREMETAL-COMPILER-RT: "{{.*}}clang_rt.crtbegin.o"
-// ARM-BAREMETAL-COMPILER-RT: "--start-group" "{{.*}}libclang_rt.builtins.a" "-lc" "-lgloss" "--end-group"
+// ARM-BAREMETAL-COMPILER-RT: "--start-group" "{{.*}}libclang_rt.builtins.a"
+// ARM-BAREMETAL-COMPILER-RT: "-lc" "-lgloss" "--end-group"
// ARM-BAREMETAL-COMPILER-RT: "{{.*}}clang_rt.crtend.o"
// RUN: %clang -### %s -fuse-ld= \
|
`ToolChain::UnwindLibType ToolChain::GetUnwindLibType( const Arg *A = Args.getLastArg(options::OPT_unwindlib_EQ); If --unwindlib= is not set to empty explicitly, then |
I revisited the tests and realized that for the ARM and RISC-V targets, the flow goes through |
Thanks for this quick fix! Hi @quic-garvgupt, could you please help approve this PR if it looks good to you. It would be helpful to unblock our bots and downstream. Thanks! |
I'm going to land this, as I'm taking "I'm aligned with this fix" as approval from garvit (I know he's in a different time zone, which may mean he's logged off for the night) |
Thanks again for your help @lenary |
#144603) …Baremetal toolchain (#121829)" This reverts the following stack of commits, due to them breaking the Fuchsia toolchain and corresponding LLVM buildbot. Revert "[Driver] Fix Arm/AArch64 Link Argument tests (#144582)" This reverts commit a79186c. Revert "[Driver] Add option to force undefined symbols during linking in BareMetal toolchain object. (#132807)" This reverts commit 9cb7545. Revert "[Driver] Fix link order of BareMetal toolchain object (#132806)" This reverts commit 31523de. Revert "[Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (#121830)" This reverts commit ec230aa. Revert "[Driver] Add support for GCC installation detection in Baremetal toolchain (#121829)" This reverts commit eb31c42.
…Baremetal toolchain (llvm#121829)" This reverts the following stack of commits, due to them breaking the Fuchsia toolchain and corresponding LLVM buildbot. Revert "[Driver] Fix Arm/AArch64 Link Argument tests (llvm#144582)" This reverts commit a79186c. Revert "[Driver] Add option to force undefined symbols during linking in BareMetal toolchain object. (llvm#132807)" This reverts commit 9cb7545. Revert "[Driver] Fix link order of BareMetal toolchain object (llvm#132806)" This reverts commit 31523de. Revert "[Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (llvm#121830)" This reverts commit ec230aa. Revert "[Driver] Add support for GCC installation detection in Baremetal toolchain (llvm#121829)" This reverts commit eb31c42.
The openmp-offload-amdgpu-runtime-2 bot specifies default rtlib of compiler-rt, but default unwindlib of libgcc. Change the tests to accept that there may be
"--as-needed" "-lgcc_s" "--no-as-needed"
betweenlibclang_rt.builtins.a
and-lc
.Relates to #121830