Skip to content

Commit

Permalink
Filter out unsupported -Wl,--dynamicbase link arg for Windows gnu t…
Browse files Browse the repository at this point in the history
…argets

xref #96
  • Loading branch information
messense committed Mar 30, 2023
1 parent a3acd60 commit ecb93c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ impl Zig {
} else if arg == "-lwindows" || arg == "-l:libpthread.a" || arg == "-lgcc" {
return None;
} else if arg == "-Wl,--disable-auto-image-base"
|| arg == "-Wl,--dynamicbase"
|| arg == "-Wl,--large-address-aware"
{
// 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/2fb0e8d162a021f8a795fb603f5d8c0017855160/compiler/rustc_target/src/spec/windows_gnu_base.rs#L22
// 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
// zig doesn't support --disable-auto-image-base, --dynamicbase, and --large-address-aware
return None;
}
} else if arg == "-Wl,--no-undefined-version" {
Expand Down

0 comments on commit ecb93c3

Please sign in to comment.