[all-commits] [llvm/llvm-project] 010a4e: [RISCV] Change linker job in Baremetal toolchain o...

Garvit Gupta via All-commits all-commits at lists.llvm.org
Mon Mar 3 09:03:29 PST 2025


  Branch: refs/heads/users/quic-garvgupt/linker_job
  Home:   https://github.com/llvm/llvm-project
  Commit: 010a4e3d5177d0a0d0db9698e8559569b97d7f9a
      https://github.com/llvm/llvm-project/commit/010a4e3d5177d0a0d0db9698e8559569b97d7f9a
  Author: Garvit Gupta <quic_garvgupt at quicinc.com>
  Date:   2025-03-03 (Mon, 03 Mar 2025)

  Changed paths:
    M clang/lib/Driver/ToolChains/BareMetal.cpp
    M clang/lib/Driver/ToolChains/BareMetal.h
    M clang/test/Driver/aarch64-toolchain-extra.c
    M clang/test/Driver/aarch64-toolchain.c
    M clang/test/Driver/arm-toolchain-extra.c
    M clang/test/Driver/arm-toolchain.c
    M clang/test/Driver/baremetal-multilib.yaml
    M clang/test/Driver/baremetal-sysroot.cpp
    M clang/test/Driver/baremetal.cpp
    M clang/test/Driver/sanitizer-ld.c

  Log Message:
  -----------
  [RISCV] Change linker job in Baremetal toolchain object to accomodate valid
GCCInstallation.(2/3)

This patch adds the defaults for CXXSstdlib type and other runtime libs.
Additionally, this patch also modifes the linker job and extend it to support
valid GCCInstallation.

This PR preserves the behavior of both toolchain objects in the linker job with
the only new change being that the presence of `--gcc-toolchain` or
`--gcc-install-dir` will imply that GNU linker is the default linker unless
otherwise a differnt linker is passed through `-fuse-ld` flag.

This is the second PR in the series of 3 PRs for merging and extending Baremetal
toolchain object. The division of the PRs is as follows:
- Teach Baremetal toolchain about GCC installation and make sysroot and
  assembler
  related changes.
- Changes related to linker job and defaults for CXXStdlib and other runtime
  libs.
- Finally removing the call to RISCVToolchain object.

RFC:
https://discourse.llvm.org/t/merging-riscvtoolchain-and-baremetal-toolchains/75524

Change-Id: I8fdb3490a3888001b1bb999e7ee8df90a187d18d



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list