diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-07-07 19:45:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-07 19:45:40 +0800 |
| commit | 4ba4b5f24fbe54a158b32d94b33e5920777458d5 (patch) | |
| tree | 73688e11de407118327694a882859ea9f3f1ef86 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | fc13c96ca698b9cc76c5e3c0ff028e2dae7ef624 (diff) | |
| parent | cdbdd8a4ad9b65fec77b5b94d5650823b52fa910 (diff) | |
| download | rust-4ba4b5f24fbe54a158b32d94b33e5920777458d5.tar.gz rust-4ba4b5f24fbe54a158b32d94b33e5920777458d5.zip | |
Rollup merge of #143482 - ia0:fix, r=fee1-dead
Fix short linker error output
This PR does 2 things:
- It removes the braces when there's a single element. This is required since brace expansion (at least in bash and zsh) only triggers if there's at least 2 elements.
- It removes the extra `.rlib` suffixes of the elements. See https://github.com/rust-lang/rust/pull/135707#discussion_r2185212393 for context.
Running `cargo +stage1 build` on the following program:
```rust
unsafe extern "C" {
fn foo() -> libc::c_int;
}
fn main() {
let x = unsafe { foo() } as u32;
// println!("{}", data_encoding::BASE64.encode(&x.to_le_bytes()));
}
```
Gives the following diff before and after the PR:
```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib}.rlib
+/tmp/foo/target/debug/deps/liblibc-faf416f178830595.rlib
```
Running on the same program with the additional dependency, we get the following diff:
```diff
-/tmp/foo/target/debug/deps/{liblibc-faf416f178830595.rlib,libdata_encoding-84bb5aadfa9e8839.rlib}.rlib
+/tmp/foo/target/debug/deps/{liblibc-faf416f178830595,libdata_encoding-84bb5aadfa9e8839}.rlib
```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
0 files changed, 0 insertions, 0 deletions
