[all-commits] [llvm/llvm-project] 805225: [Driver] Add support for crtbegin.o, crtend.o and ...
Garvit Gupta via All-commits
all-commits at lists.llvm.org
Tue May 27 05:34:01 PDT 2025
Branch: refs/heads/users/quic-garvgupt/linker_job
Home: https://github.com/llvm/llvm-project
Commit: 805225a2fd3f8f8b0ef1b66ef2e9adcae5a23bfa
https://github.com/llvm/llvm-project/commit/805225a2fd3f8f8b0ef1b66ef2e9adcae5a23bfa
Author: Garvit Gupta <quic_garvgupt at quicinc.com>
Date: 2025-05-26 (Mon, 26 May 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:
-----------
[Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal
toolchain object
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
Change-Id: Ie06dc976c306cf04ec2733bbb2d271c57d201f86
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