Skip to content

Commit

Permalink
Filter out unsupported -Wl,--no-undefined-version
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Mar 12, 2023
1 parent 56a29bd commit b94b3d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,17 @@ impl Zig {
return None;
} else if arg == "-Wl,--disable-auto-image-base"
|| arg == "-Wl,--large-address-aware"
|| arg == "-Wl,--no-undefined-version"
{
// https://github.com/rust-lang/rust/blob/f0bc76ac41a0a832c9ee621e31aaf1f515d3d6a5/compiler/rustc_target/src/spec/windows_gnu_base.rs#L23
// https://github.com/rust-lang/rust/blob/f0bc76ac41a0a832c9ee621e31aaf1f515d3d6a5/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs#L16
// zig doesn't support --disable-auto-image-base, --large-address-aware
return None;
}
} else if arg == "-Wl,--no-undefined-version" {
// https://github.com/rust-lang/rust/blob/542ed2bf72b232b245ece058fc11aebb1ca507d7/compiler/rustc_codegen_ssa/src/back/linker.rs#L723
// zig doesn't support --no-undefined-version
return None;
}
if is_musl {
// Avoids duplicated symbols with both zig musl libc and the libc crate
Expand Down

0 comments on commit b94b3d9

Please sign in to comment.