[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-11 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @topperc, can you add instruction alias for cflush and cdiscard instructions when the rs1 is X0 to `sf.cflush.d.l1` and `sf.cflush.d.l1` respectively, as this register is optional according to spec? https://github.com/llvm/llvm-project/pull/83896 _

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-11 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Also, I think we might need to update the extensions in the `RISCVProcessors.td` file under SIFIVE_S76 microcontroller? https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-11 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: > > Hi @topperc, can you add instruction alias for cflush and cdiscard > > instructions when the rs1 is X0 to `sf.cflush.d.l1` and `sf.cflush.d.l1` > > respectively, as this register is optional according to spec? > > x0 has special meaning, but the spec never says it is "

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-11 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: > > Also, I think we might need to update the extensions in the > > `RISCVProcessors.td` file under SIFIVE_S76 microcontroller? > > This is a M-mode only extension, and we haven't historically been adding M or > S mode extensions to the -mcpu lists. Except for `xiangshan-n

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Thanks for clearing the confusion around whether rs1 would be optional or not. Can we also add lit tests for the aliases? https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Thanks for the prompt reply and latest patchset. 1. Do we need to add documentation in RISCVUsage.rst file for xsfcease? 2. Also, as we are adding cease instruction in this PR, can we rename the PR to include the cease instruction as well? https://github.com/llvm/llvm-proj

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1, cflush.d.l1, and cease instructions. (PR #83896)

2024-03-13 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: I believe the patch is ready to be merged now, but since I am not the reviewer here, someone else must approve it as well. Thanks again for the patch! https://github.com/llvm/llvm-project/pull/83896 ___ cfe-commits mailing list c

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-23 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: ping! for merging this PR https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV ba… (PR #81727)

2024-02-14 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/81727 The below culprit patch enabled the generation of asynchronous unwind tables (-funwind-tables=2) by default for RISCV for both linux and RISCVToolChain baremetal object. However, since there are 2 baremeta

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV ba… (PR #81727)

2024-02-14 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @jonathonpenix @apazos @kito-cheng @asb @MaskRay - Requesting for adding as reviewers to review the PR. Thanks in advance! https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-16 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @asb, since Petr already gave a good-ahead to this patch in the meeting, let me know if we can merge this PR if there are no new changes need to be made https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing li

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-20 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/81727 >From 42211bccd8ffc60751234ab5695be135ea8b6373 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 14 Feb 2024 03:00:20 -0800 Subject: [PATCH 1/2] [RISCV] Disable generation of asynchronous unwind tables

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-20 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/81727 >From 42211bccd8ffc60751234ab5695be135ea8b6373 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 14 Feb 2024 03:00:20 -0800 Subject: [PATCH] [RISCV] Disable generation of asynchronous unwind tables for

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-20 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/81727 >From 8cc7535ed4c05d4cf14cdedc26077eccf06c8d53 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 14 Feb 2024 03:00:20 -0800 Subject: [PATCH] [RISCV] Disable generation of asynchronous unwind tables for

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-20 Thread Garvit Gupta via cfe-commits
@@ -421,3 +421,11 @@ // MIPSN32R6EL: "-target-cpu" "mips64r6" // MIPSN32R6EL: "-target-abi" "n32" // MIPSN32R6EL: "-mfloat-abi" "hard" + +// RUN: %clang --target=riscv32-unknown-elf --gcc-toolchain="" -### %s 2>&1 | FileCheck %s -check-prefix=NOUWTABLE quic-ga

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-20 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @asb, I do not have write access, requesting to merge this PR on my behalf. Also, requesting to backport this PR onto the release branch. Thanks in advance! https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mai

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-20 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/81727 >From 0d1f9be389a41ba2f1531bf13e8d1f14aadf9eeb Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 14 Feb 2024 03:00:20 -0800 Subject: [PATCH] [RISCV] Disable generation of asynchronous unwind tables for

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-21 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @MaskRay, please review the updated changes and if they are fine, please merge this PR on my behalf. Thanks! https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/118809 Currently, LLVM has two RISC-V toolchain classes in Clang for baremetal development, creating unnecessary maintenance overhead. This patch extends the BareMetal toolchain to support an existing GCC instal

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/118809 >From b74795d44846b79252bd3fb1f1e8179311725c74 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 13 Nov 2024 02:45:51 -0800 Subject: [PATCH] [RISCV] Merging RISCVToolChain and BareMetal toolchains Cu

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-06 Thread Garvit Gupta via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-06 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/121829 This patch introduces the baretmetal toolchain object about GCC Installation. Currently, if `--gcc-installation` ot `--gcc-install-dir` options are passed on commandline, then sysroot will be formed from th

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-06 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: * **#121829** https://app.graphite.dev/github/pr/llvm/llvm-project/121829?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-projec

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121821)

2025-01-06 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/121821 This patch introduces the baretmetal toolchain object about GCC Installation. Currently, if `--gcc-installation` ot `--gcc-install-dir` options are passed on commandline, then sysroot will be formed from

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121821)

2025-01-06 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/121821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-06 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt ready_for_review https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-06 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-07 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121829 >From 02d70a2c1fa746eafa87308f0c8109bb2c91164f Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 13 Dec 2024 05:31:56 -0800 Subject: [PATCH] [RISCV] Teach Barmetal toolchain about GCC installation(1/3

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-04 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @petrhosek, following up on our last RISC-V embedded sync-up, can you please review this patch? Thanks https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-11 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/118809 >From 569feb86c654be044781aa5968907a72ea882e88 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 13 Nov 2024 02:45:51 -0800 Subject: [PATCH] [WIP] Merging RISCVToolChain and BareMetal toolchains Curr

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-11 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/118809 >From b58f9dd197c78b1e39676022a421ca0e6d5552a5 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 13 Nov 2024 02:45:51 -0800 Subject: [PATCH] [WIP] Merging RISCVToolChain and BareMetal toolchains Curr

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-11 Thread Garvit Gupta via cfe-commits
@@ -6521,11 +6521,7 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, break; case llvm::Triple::riscv32: case llvm::Triple::riscv64: -if (toolchains::RISCVToolChain::hasGCCToolchain(*this, Args)) - TC = - std::make_

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-11 Thread Garvit Gupta via cfe-commits
@@ -110,20 +111,95 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-11 Thread Garvit Gupta via cfe-commits
@@ -78,8 +86,9 @@ class LLVM_LIBRARY_VISIBILITY BareMetal : public ToolChain { using OrderedMultilibs = llvm::iterator_range::const_reverse_iterator>; OrderedMultilibs getOrderedMultilibs() const; - + bool UseLD; quic-garvgupt wrote: please see my

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-20 Thread Garvit Gupta via cfe-commits
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-29 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Gentle Ping again! https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-13 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Gentle Ping! https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-10 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2025-01-09 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: I have divided this PR into three separate PRs to streamline the review process and ensured that ARM and RISCV tests are not modified in the same PR. Please review them and provide any feedback or comments. Thanks! [RISCV] Teach Barmetal toolchain about GCC installation(1/

[clang] [RISCV] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-01-07 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121829 >From 03b91a8d408bacec17391b995611dbbb0ea62edd Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 13 Dec 2024 05:31:56 -0800 Subject: [PATCH] [RISCV] Teach Barmetal toolchain about GCC installation(1/3

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-03-24 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121829 >From e07a4cd4e0ff77f74b66695923bc998904c14746 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 13 Dec 2024 05:31:56 -0800 Subject: [PATCH] [Driver] Teach Barmetal toolchain about GCC installation T

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-03-24 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-03-24 Thread Garvit Gupta via cfe-commits
@@ -110,20 +110,76 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +std::string BareMetal::computeSysRoot() const { + if (!SysRoot.empty()) +return SysRoot; + + std::string SysRoot = getDriver().SysRoot

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-03-24 Thread Garvit Gupta via cfe-commits
@@ -79,7 +87,6 @@ class LLVM_LIBRARY_VISIBILITY BareMetal : public ToolChain { OrderedMultilibs getOrderedMultilibs() const; std::string SysRoot; quic-garvgupt wrote: Removing this private variable was making the code messy because there have been update

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-23 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: > I'm looking at this patch in isolation, so its possible that the comments > here are addressed elasewhere. > > It looks like useful functionality to add to the bare metal driver. > > It also looks like there is some scope for some documentation, for users and > for tool

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-23 Thread Garvit Gupta via cfe-commits
@@ -110,20 +110,81 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +static bool hasGCCToolChainAlongSideClang(const Driver &D) { + SmallString<128> GCCDir; + llvm::sys::path::append(GCCDir, D.Dir, "..", D.g

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-03-11 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @petrhosek, I've addressed all your comments. Please review the changes and approve the PR if everything looks good. https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-03-11 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121829 >From 9bb78235d2ba008dc49dc4746edbd9978a92396b Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 13 Dec 2024 05:31:56 -0800 Subject: [PATCH] [RISCV] Teach Barmetal toolchain about GCC installation(1/3

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-23 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: It's been a few weeks since this patch was last reviewed. If everything looks good, could someone please provide an LGTM? I'd like to merge this patch soon. https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailin

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-23 Thread Garvit Gupta via cfe-commits
@@ -110,20 +111,93 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +// GCC sysroot here means form sysroot from either --gcc-install-dir, or from +// --gcc-toolchain or if the toolchain is installed alongside

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-04 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-03 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @petrhosek, I've addressed all your comments. Please review the changes and approve the PR if everything looks good. https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-04 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121829 >From 1d0db96afab52903a267d600cab02c24900101af Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 13 Dec 2024 05:31:56 -0800 Subject: [PATCH] [Driver] Teach Barmetal toolchain about GCC installation T

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/144649 >From 14a2bb5dead7fa0e3d442e04ba73ad5f98d2e90e Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 17 Jun 2025 22:49:55 +0530 Subject: [PATCH] [Driver] Add support for crtbegin.o, crtend.o and libgloss

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/118809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #145390)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/145390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Driver] Fix link order of BareMetal toolchain object (PR #146291)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/146291 The linker job in BareMetal toolchain object will be used by GNU ld and lld both. However, gnuld process the arguments in the order in which they appear on command line, whereas there is no such restricti

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/144649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/147589 >From 6f96fc844751a95ee18b69ddb850ddd2fe76a89c Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 07:21:37 -0700 Subject: [PATCH 1/2] Propogate appropriate linker flags for `-static-pie` in

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-07 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/146849 >From 3d0220ecce368a481981c414f789d9dbbfc49c81 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Thu, 3 Jul 2025 02:56:01 -0700 Subject: [PATCH] [Driver][RISCV] Fix and print appropriate compiler-rt path

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-07 Thread Garvit Gupta via cfe-commits
@@ -206,6 +206,15 @@ std::string BareMetal::computeSysRoot() const { return computeClangRuntimesSysRoot(D, /*IncludeTriple*/ true); } +std::string BareMetal::getCompilerRTPath() const { + if (IsGCCInstallationValid || detectGCCToolchainAdjacent(getDriver())) { +SmallStr

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-07 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/147589 >From c6420bc64c2745c49400408ba93afa34eea194e3 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 12:44:44 -0700 Subject: [PATCH] Propogate linker flags when `-static-pie` is enabled in Bar

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/147589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/147589 >From a1f3797d0acb93e66959c5163aeb49213d2d32a1 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 12:44:44 -0700 Subject: [PATCH] Propogate linker flags when `-static-pie` is enabled in Bar

[clang] Propogate linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-08 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/147589 None >From 6f96fc844751a95ee18b69ddb850ddd2fe76a89c Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 8 Jul 2025 07:21:37 -0700 Subject: [PATCH 1/2] Propogate appropriate linker flags for `-static-pi

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-10 Thread Garvit Gupta via cfe-commits
@@ -599,11 +599,18 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const Driver &D = getToolChain().getDriver(); const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); + const bool

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-10 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/147589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Fix incorrect compiler-rt path override in BareMetal toolchain after RISCVToolChain removal (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Fix and print appropriate compiler-rt path when GCCInstallation is valid (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/146849 Baremetal and RISCVToolchain used different paths for clangrt builtins relative to resource-dir before RISCVToolChain got removed in commit f8cb798 This created a discrepancy in behavior for riscv target wh

[clang] [Driver][RISCV] Fix and print appropriate compiler-rt path when GCCInstallation is valid (PR #146849)

2025-07-03 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/146849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Driver] Fix link order of BareMetal toolchain object (PR #146291)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/146291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/121831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][Driver] Add support for `-m` flag to linker job of Baremetal toolchain (PR #134442)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/134442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/121831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland[Driver] Add option to force undefined symbols during linking in BareMetal toolchain object. (PR #146304)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/146304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Forward sysroot from Driver to linker in BareMetal ToolChain Object (PR #132808)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/132808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][Driver] Add support for `-m` flag to linker job of Baremetal toolchain (PR #134442)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/134442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV][Driver] Add support for `-m` flag to linker job of Baremetal toolchain (PR #134442)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/134442 >From 9d48ea76ef90ac9e76ade4af77667e44652e3408 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Fri, 4 Apr 2025 12:51:19 -0700 Subject: [PATCH] [RISCV][Driver] Add support for `-m` flag to linker job of

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-30 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: > > Moreover, this patch makes gnuld the default linker for baremetal > > toolchain object. User need to pass -fuse-ld=lld explicitly to driver to > > select > > lld > > This seems like an unrelated change, it was not mentioned in the RFC, and it > breaks things: baremetal

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-30 Thread Garvit Gupta via cfe-commits
@@ -59,3 +118,39 @@ // CXX-AARCH64-BAREMETAL-NOSYSROOT-LIBCXX: "-internal-isystem" "{{.*}}/Inputs/basic_aarch64_gcc_tree/lib/gcc/aarch64-none-elf/8.2.1/../../../../aarch64-none-elf/include/c++/v1" // CXX-AARCH64-BAREMETAL-NOSYSROOT-LIBCXX: "-internal-isystem" "{{.*}}/Inputs/

[clang] Reland[Driver] Add option to force undefined symbols during linking in BareMetal toolchain object. (PR #146304)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/146304 Add support for `-u` option to force defined symbols. This option is supported by both lld and gnuld. This is done as a part of the effort to merge RISCVToolchain object into BareMetal toolchain object.

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-15 Thread Garvit Gupta via cfe-commits
@@ -599,11 +599,18 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const Driver &D = getToolChain().getDriver(); const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); + const bool

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-15 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: >I don't think that this should necessarily prevent this patch from landing. To >some degree users can just not use the option if the toolchain doesn't support >it. The file names for crt files are borrowed from their linux equivalent. However as already pointed out, if

[clang] Fix extraneous addition of `-X` flag in baremetal toolchain (PR #148855)

2025-07-15 Thread Garvit Gupta via cfe-commits
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

[clang] Fix adding support for -X flag in Baremetal toolchain (PR #147804)

2025-07-15 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/147804 >From d92b98015db0e03d1f71658884cd931162835184 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Wed, 9 Jul 2025 11:58:19 -0700 Subject: [PATCH] Fix adding support for -X flag in Baremetal toolchain Commi

[clang] Fix adding support for -X flag in Baremetal toolchain (PR #147804)

2025-07-15 Thread Garvit Gupta via cfe-commits
@@ -613,8 +613,8 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, return; } + CmdArgs.push_back("-X"); quic-garvgupt wrote: I made a few mistakes in the commit message and title. The intent of this PR is to add support for

[clang] Reland [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #145390)

2025-06-26 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/145390 >From 296df79cb9e9696daa926267c8a9a853930fdc46 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 17 Jun 2025 21:43:17 +0530 Subject: [PATCH] Reland [Driver] Add support for GCC installation detection

[clang] Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #144649)

2025-06-26 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/144649 >From 36f8e160dfad059fdada0a00b5cdc20dde0076c0 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Tue, 17 Jun 2025 22:49:55 +0530 Subject: [PATCH] [Driver] Add support for crtbegin.o, crtend.o and libgloss

[clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)

2025-06-30 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/121831 >From b9e1db372117d9d418d0812a09874526e88efad4 Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Mon, 6 Jan 2025 10:05:08 -0800 Subject: [PATCH] [RISCV] Integrate RISCV target in baremetal toolchain object

[clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)

2025-06-30 Thread Garvit Gupta via cfe-commits
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const { return llvm::reverse(Default); } +ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const { + if (getTriple().isRISCV() && GCCInstallation.isValid()) +return ToolChain

[clang] [RISCV] Integrate RISCV target in baremetal toolchain object and deprecate RISCVToolchain object (PR #121831)

2025-06-30 Thread Garvit Gupta via cfe-commits
@@ -336,6 +336,26 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const { return llvm::reverse(Default); } +ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const { + if (getTriple().isRISCV() && GCCInstallation.isValid()) +return ToolChain

[clang] [Driver] Forward sysroot from Driver to linker in BareMetal ToolChain Object (PR #132808)

2025-06-29 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt updated https://github.com/llvm/llvm-project/pull/132808 >From e302490b6e6350951e75bd68578606aa7909692e Mon Sep 17 00:00:00 2001 From: Garvit Gupta Date: Mon, 24 Mar 2025 07:04:59 -0700 Subject: [PATCH] [Driver] Forward sysroot from Driver to linker in BareMetal

[clang] Remove extraneous addition of `-X` flag in baremetal toolchain (PR #148855)

2025-07-22 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt closed https://github.com/llvm/llvm-project/pull/148855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-06-03 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @smithp35, can you pls review the latest changes and approve this PR if everything looks fine? https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] Reland [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #144640)

2025-06-17 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt edited https://github.com/llvm/llvm-project/pull/144640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #121829)

2025-06-17 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: > > Do the fuchsia builders actually produce output on a failure? We seem to > > just get exit code 1, but no indication of what filecheck had problems with. > > They do; here's a link! Let me know if you have an problems with the Web UI; > I can paste things here if so.

[clang] [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #144640)

2025-06-17 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/144640 This patch introduces enhancements to the Baremetal toolchain to support GCC toolchain detection. - If the --gcc-install-dir or --gcc-toolchain options are provided and point to valid paths, the sysroot is

[clang] Fix tests failing on fuchsia clang x86_64 builders (PR #144655)

2025-06-18 Thread Garvit Gupta via cfe-commits
https://github.com/quic-garvgupt created https://github.com/llvm/llvm-project/pull/144655 Fuchsia sets CLANG_DEFAULT_UNWINDLIB to libunwind. As a result, when rtlib is set to libgcc and unwindlib is not explicitly specified, tests using Fuchsia as the default platform will fail. To address thi

  1   2   >