diff options
| author | kennytm <kennytm@gmail.com> | 2019-03-16 14:56:25 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-16 14:56:25 +0800 |
| commit | e2fdf625e9f3a1aeb3c5f1e3327140fdfc437bb7 (patch) | |
| tree | abe823ce169dbca9b0fbc94c2caa0bdf0dad7ab8 /src | |
| parent | 152ed3717b3387f9b79fbd6917bd3ce3b994a9a1 (diff) | |
| parent | 876258b0fa31fc1d1a79ddc0e5a0c9c5f0e8f85b (diff) | |
| download | rust-e2fdf625e9f3a1aeb3c5f1e3327140fdfc437bb7.tar.gz rust-e2fdf625e9f3a1aeb3c5f1e3327140fdfc437bb7.zip | |
Rollup merge of #58976 - phil-opp:patch-2, r=alexcrichton
Default to integrated `rust-lld` linker for UEFI targets The `x86_64-unknown-uefi` target was added in https://github.com/rust-lang/rust/pull/56769 with the linker defaulting to `lld-link`. This means that a system linker with that name is required for linking. I think defaulting to `rust-lld`, which is shipped with Rust, is a better default for the following reasons: - Most systems don't have `lld-link` installed, so it forces users to install it first. - The naming of LLD executables is not standarized, so users often need to create an additional symlink before things work. For example, on Ubuntu `apt install lld` leads to an executable named `lld-link-6.0`. - We already default to `rust-lld` for [many targets](https://github.com/rust-lang/rust/search?utf8=%E2%9C%93&q=rust-lld&type=), including embedded and WASM targets, so doing the same for UEFI crates seems consistent to me. (It even seems like `x86_64-unknown-uefi` is the [only target](https://github.com/rust-lang/rust/search?q=lld-link&unscoped_q=lld-link) that uses `lld-link`.) cc @dvdhrm who added the target and @kkk669 who [proposed to use `rust-lld`](https://github.com/rust-lang/rust/pull/56769#issuecomment-461119648).
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_target/spec/uefi_base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_target/spec/uefi_base.rs b/src/librustc_target/spec/uefi_base.rs index 631966c09a4..956767a22a0 100644 --- a/src/librustc_target/spec/uefi_base.rs +++ b/src/librustc_target/spec/uefi_base.rs @@ -59,7 +59,7 @@ pub fn opts() -> TargetOptions { singlethread: true, emit_debug_gdb_scripts: false, - linker: Some("lld-link".to_string()), + linker: Some("rust-lld".to_string()), lld_flavor: LldFlavor::Link, pre_link_args, |
