diff options
| author | bors <bors@rust-lang.org> | 2024-08-11 15:08:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-11 15:08:03 +0000 |
| commit | 9cb1998ea15e179482504e07cad8fa121e169a32 (patch) | |
| tree | 454444fcc1b594c3459165812fd7b34c4a136138 /compiler/rustc_codegen_llvm/src | |
| parent | 5e5ec8af1b34a71fbf0063586a70bae7460a892a (diff) | |
| parent | b22253c45489716a27164b3584a580140afa6967 (diff) | |
| download | rust-9cb1998ea15e179482504e07cad8fa121e169a32.tar.gz rust-9cb1998ea15e179482504e07cad8fa121e169a32.zip | |
Auto merge of #122362 - Zoxc:rustc_driver_static_std, r=oli-obk,lqd,bjorn3,Kobzol
Link `std` statically in `rustc_driver` This makes `rustc_driver` statically link to `std`. This is done by not passing `-C prefer-dynamic` when building `rustc_driver`. However building `rustc-main` won't work currently as it tries to dynamically link to both `rustc_driver` and `std` resulting in a crate graph with `std` duplicated. To fix that new command line option `-Z prefer_deps_of_dynamic` is added which prevents linking to a dylib if there's a static variant of it already statically linked into another dylib dependency. The main motivation for this change is to enable `#[global_allocator]` to be used in `rustc_driver` allowing overriding the allocator used in rustc on all platforms. --- Instead of adding `-Z prefer_deps_of_dynamic`, this PR is changed to crate opt-in to the linking change via the `rustc_private` feature instead, as that would be typically needed to link to `rustc_driver` anyway. --- try-job: aarch64-apple try-job: x86_64-msvc try-job: i686-mingw try-job: dist-x86_64-msvc try-job: aarch64-gnu
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
