Skip to content

wrap linkers #230

@yshui

Description

@yshui

rustup toolchains come with their own linkers, and is used for linking rust programs. e.g.:

"-B/nix/store/cvvrlhx1wq0bcpiv06rc4q6r06spc4nz-rust-with-components-2025-08-04/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-fuse-ld=lld"

which is part of the linker command. under /nix/store/cvvrlhx1wq0bcpiv06rc4q6r06spc4nz-rust-with-components-2025-08-04/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld there are a bunch of variants of lld:

 ld.lld ld64.lld  lld-link  wasm-ld

which all are just wrappers for rust-lld.

problem is, rust-lld is not wrapped, in the sense that it won't add extra nix rpaths to the resulting executable. which means the result cannot run without a properly set LD_LIBRARY_PATH.

rust-overlay should wrap rust-lld.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions