[all-commits] [llvm/llvm-project] ed25d4: Reland [Driver] Add support for crtbegin.o, crtend...

Garvit Gupta via All-commits all-commits at lists.llvm.org
Sun Jun 29 13:04:54 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed25d473fb1b7bb85476566cbe1ff78865e4d730
      https://github.com/llvm/llvm-project/commit/ed25d473fb1b7bb85476566cbe1ff78865e4d730
  Author: Garvit Gupta <quic_garvgupt at quicinc.com>
  Date:   2025-06-30 (Mon, 30 Jun 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.cpp
    M clang/test/Driver/sanitizer-ld.c

  Log Message:
  -----------
  Reland [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object  (#144649)

This patch conditionalise the addition of crt{begin,end}.o object files
along with addition of -lgloss lib based on whether libc selected is
newlib or
llvm libc. Since there is no way a user can specify which libc it wants
to
link against, currently passing valid GCCInstallation to driver will
select
newlib otherwise it will default to llvm libc.

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 is the 2nd patch in the series of patches of merging RISCVToolchain
into BareMetal toolchain object.

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



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