Skip to content

Commit

Permalink
fix zig: move check to macos
Browse files Browse the repository at this point in the history
  • Loading branch information
serjflint committed Sep 10, 2023
1 parent 7b5eda1 commit 83a4afc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,11 @@ impl Zig {
} else if arg == "-Wl,--disable-auto-image-base"
|| arg == "-Wl,--dynamicbase"
|| arg == "-Wl,--large-address-aware"
|| arg == "-Wl,--exported_symbols_list"
{
// 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, --dynamicbase, --large-address-aware and --exported_symbols_list
// zig doesn't support --disable-auto-image-base, --dynamicbase and --large-address-aware
return None;
}
} else if arg == "-Wl,--no-undefined-version" {
Expand Down Expand Up @@ -169,6 +168,13 @@ impl Zig {
}
}
}
if is_macos {
if arg.starts_with("-Wl,--exported_symbols_list,") {
// zig doesn't support --exported_symbols_list arg
// https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-exported_symbols_list
return None;
}
}
Some(arg.to_string())
};
let has_undefined_dynamic_lookup = |args: &[String]| {
Expand Down

0 comments on commit 83a4afc

Please sign in to comment.