[all-commits] [llvm/llvm-project] f4af05: [Driver] Add support for crtbegin.o, crtend.o and ...
Garvit Gupta via All-commits
all-commits at lists.llvm.org
Mon Mar 24 11:46:42 PDT 2025
Branch: refs/heads/users/quic-garvgupt/linker_job
Home: https://github.com/llvm/llvm-project
Commit: f4af05b47bddc3a88309341d5ff79cc9178f78ec
https://github.com/llvm/llvm-project/commit/f4af05b47bddc3a88309341d5ff79cc9178f78ec
Author: Garvit Gupta <quic_garvgupt at quicinc.com>
Date: 2025-03-24 (Mon, 24 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/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