https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/148855
Commit 597ee88 moved the -X flag to a new position in the baremetal toolchain's linker job, but unintentionally left the original instance in place. This patch removes the redundant flag, ensuring -X is passed only once. >From 39063e7df808cdf86a0610918b034cf8dc9626e9 Mon Sep 17 00:00:00 2001 From: Garvit Gupta <quic_garvg...@quicinc.com> Date: Tue, 15 Jul 2025 07:08:23 -0700 Subject: [PATCH] Fix extraneous addition of `-X` flag in baremetal toolchain Commit 597ee88 moved the -X flag to a new position in the baremetal toolchain's linker job, but unintentionally left the original instance in place. This patch removes the redundant flag, ensuring -X is passed only once. Change-Id: I4318e6eba52e4664caed1c21a276210346b65405 --- clang/lib/Driver/ToolChains/BareMetal.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/clang/lib/Driver/ToolChains/BareMetal.cpp b/clang/lib/Driver/ToolChains/BareMetal.cpp index e670696cd59ae..497f3330237b9 100644 --- a/clang/lib/Driver/ToolChains/BareMetal.cpp +++ b/clang/lib/Driver/ToolChains/BareMetal.cpp @@ -694,9 +694,6 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, NeedCRTs) CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath(CRTEnd))); - if (TC.getTriple().isRISCV()) - CmdArgs.push_back("-X"); - // The R_ARM_TARGET2 relocation must be treated as R_ARM_REL32 on arm*-*-elf // and arm*-*-eabi (the default is R_ARM_GOT_PREL, used on arm*-*-linux and // arm*-*-*bsd). _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits