mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-06-18 01:53:54 +00:00
build: replace mold with the wild linker
This commit is contained in:
parent
b43d88c749
commit
b42e6f4af9
8 changed files with 53 additions and 66 deletions
|
|
@ -1,16 +1,16 @@
|
|||
# Use a linker wrapper that invokes mold then strips junk sections with objcopy.
|
||||
# mold cannot discard .eh_frame/.dynstr/.comment via linker scripts, so we do
|
||||
# it as a post-link step.
|
||||
# See:
|
||||
# <https://github.com/rui314/mold?tab=readme-ov-file#how-to-use>
|
||||
# Link the tier-1 Linux arches with the wild linker, driven by clang via the
|
||||
# scripts/clang-wild wrapper.
|
||||
#
|
||||
# Binary-specific link flags live in microfetch/build.rs via cargo:rustc-link-arg-bin
|
||||
# so they only affect the final binary and don't break proc-macro or build-script linking.
|
||||
[target.'cfg(target_os = "linux")']
|
||||
linker = "scripts/ld-wrapper"
|
||||
rustflags = [
|
||||
# Suppress .eh_frame emission from our own codegen (does not cover compiler_builtins;
|
||||
# those remnants are removed by the linker wrapper via objcopy post-link)
|
||||
"-C",
|
||||
"force-unwind-tables=no",
|
||||
]
|
||||
# Suppress .eh_frame emission from our own codegen.
|
||||
rustflags = ["-C", "force-unwind-tables=no"]
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "scripts/clang-wild"
|
||||
rustflags = ["-C", "force-unwind-tables=no"]
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "scripts/clang-wild"
|
||||
rustflags = ["-C", "force-unwind-tables=no"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue