diff --git a/cargo-auditable/tests/fixtures/bare_linker/.cargo/config.toml b/cargo-auditable/tests/fixtures/bare_linker/.cargo/config.toml index b7511fc..e970667 100644 --- a/cargo-auditable/tests/fixtures/bare_linker/.cargo/config.toml +++ b/cargo-auditable/tests/fixtures/bare_linker/.cargo/config.toml @@ -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 \ No newline at end of file diff --git a/cargo-auditable/tests/it.rs b/cargo-auditable/tests/it.rs index bf3a9ae..b30ce1a 100644 --- a/cargo-auditable/tests/it.rs +++ b/cargo-auditable/tests/it.rs @@ -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");