rust/compiler/rustc_codegen_ssa/src
许杰友 Jieyou Xu (Joe) 4ba4b5f24f
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
```
2025-07-07 19:45:40 +08:00
..
back setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
debuginfo Flatten ifs in rustc_codegen_ssa 2025-03-17 18:56:52 +00:00
mir codegen_ssa: replace a Result by an Either 2025-07-05 15:53:56 +02:00
traits setup CI and tidy to use typos for spellchecking and fix few typos 2025-07-03 10:51:06 +03:00
assert_module_sources.rs Move methods from Map to TyCtxt, part 4. 2025-03-12 08:55:37 +11:00
base.rs Remove support for dyn* 2025-07-01 19:00:21 +00:00
codegen_attrs.rs Remove repr(align) code 2025-07-06 16:56:39 -04:00
common.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
errors.rs Reverse comparison order 2025-07-07 08:49:10 +02:00
lib.rs [Arm64EC] Only decorate functions with # 2025-06-23 12:38:35 -07:00
meth.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
mono_item.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
size_of_val.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
target_features.rs Rollup merge of #142876 - JonathanBrouwer:target_feature_parser, r=oli-obk 2025-07-03 13:29:36 +02:00