Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cargo-auditable/tests/fixtures/bare_linker/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,15 @@ rustflags = ["-C", "target-feature=+crt-static"]
linker = "rust-lld"
rustflags = ["-C", "target-feature=+crt-static"]

# === Not included in the original Rayhunter example ===

# this tests for https://github.com/rust-lang/rust/issues/96498
[target.i686-pc-windows-msvc]
linker = "rust-lld"

# this Just Works so we might as well see if it keeps working
[target.x86_64-pc-windows-msvc]
linker = "rust-lld"

# GNU targets generally don't work with bare linkers; not even rayhunter uses it there.
# So we're not testing windows-gnu or linux-gnu
8 changes: 5 additions & 3 deletions cargo-auditable/tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,11 @@ fn test_bare_linker_inner(sbom: bool) {
let cargo_toml =
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/bare_linker/Cargo.toml");
// The motivating example is https://github.com/EFForg/rayhunter/blob/main/.cargo/config.toml
// and the config file fixture is based on that.
// There doesn't seem to be a way to build with a bare linker for GNU targets, only Apple and Musl,
// so this tests really only does anything on those.
// and the config file fixture is based on that, with some additions.
//
// The config file doesn't specify a bare linker for all targets;
// e.g. GNU doesn't seem to support using a bare linker at all.
// See the config file for the exact list of targets where this is tested.
let config_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("tests/fixtures/bare_linker/.cargo/config.toml");

Expand Down
Loading