Skip to content

Commit 2bd4e81

Browse files
authored
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 rust-lang/rust#135707 (comment) 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 ```
2 parents bdf0c38 + 25accbd commit 2bd4e81

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)