Skip to content

Commit

Permalink
Windows /force:unresolved?
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Jul 18, 2024
1 parent 4b9262b commit 5bf26b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions test-crates/bin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test-crates/bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
cfg-if = "1.0.0"
exports = { version = "0.1.0", path = "../exports" }
libloading = "0.8.4"
rubicon = { path = "../../rubicon" }
Expand Down
13 changes: 9 additions & 4 deletions test-crates/bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ fn main() {
for module in modules {
soprintln!("building {module}");

#[cfg(target_os = "macos")]
let rustflags = "-Clink-arg=-undefined -Clink-arg=dynamic_lookup";
#[cfg(not(target_os = "macos"))]
let rustflags = "";
cfg_if::cfg_if! {
if #[cfg(target_os = "macos")] {
let rustflags = "-Clink-arg=-undefined -Clink-arg=dynamic_lookup";
} else if #[cfg(target_os = "windows")] {
let rustflags = "-Clink-arg=/FORCE:UNRESOLVED";
} else {
let rustflags = "";
}
}

let output = std::process::Command::new("cargo")
.arg("b")
Expand Down

0 comments on commit 5bf26b7

Please sign in to comment.