about summary refs log tree commit diff
path: root/compiler/rustc_target/src/spec/crt_objects.rs
AgeCommit message (Collapse)AuthorLines
2025-09-19Stop linking rs{begin,end} on x86_64-*-windows-gnuMateusz Mikuła-3/+14
Until now, x86_64-pc-windows-gnu linked `rsbegin.o` and `rsend.o` just like i686-pc-windows-gnu, even though they were no-ops for it. This was likely done for the simplicity back when it was introduced. Today the things are different and these startup/end objects harm other features, like `build-std`. Given the demotion of i686-pc-windows-gnu from tier 1, there is no point in hurting x86_64-pc-windows-gnu, which remains a tier 1. The files are still shipped in case downstream crates expect them, as in case of the unmaintained `xargo`.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2023-10-18unify `LinkSelfContained` and `LinkSelfContainedDefault`Rémy Rakic-38/+0
Removes the backwards-compatible `LinkSelfContainedDefault`, by incorporating the remaining specifics into `LinkSelfContained`. Then renames the modern options to keep the old name.
2022-08-12rustc_target: Update some old naming around self contained linkingVadim Petrochenkov-18/+22
The "fallback" naming pre-dates introduction of `-Clink-self-contained`
2022-06-03Use serde_json for target spec jsonbjorn3-1/+1
2022-04-03Replace every `String` in Target(Options) with `Cow<'static, str>`Loïc BRANSTETT-4/+5
2021-03-08WASI: Switch to crt1-command.o to enable support for new-style commandsDan Gohman-4/+6
This switches Rust's WASI target to use crt1-command.o instead of crt1.o, which enables support for new-style commands. By default, new-style commands work the same way as old-style commands, so nothing immediately changes here, but this will be needed by later changes to enable support for typed arguments. See here for more information on new-style commands: - https://github.com/WebAssembly/wasi-libc/pull/203 - https://reviews.llvm.org/D81689
2021-02-26Link crtbegin/crtend on musl to terminate .eh_frameNikita Popov-7/+14
For some targets, rustc uses a "CRT fallback", where it links CRT object files it ships instead of letting the host compiler link them. On musl, rustc currently links crt1, crti and crtn (provided by libc), but does not link crtbegin and crtend (provided by libgcc). In particular, crtend is responsible for terminating the .eh_frame section. Lack of terminator may result in segfaults during unwinding, as reported in #47551 and encountered by the LLVM 12 update in #81451. This patch links crtbegin and crtend for musl as well, following the table at the top of crt_objects.rs.
2021-01-08Add wasi-exec-model cg option for emitting wasi reactorsNoah-9/+11
2020-11-05Fix automatic_links warningsGuillaume Gomez-1/+1
2020-08-30mv compiler to compiler/mark-0/+145