use export-executable-symbols

This commit is contained in:
Folkert 2022-11-10 18:50:31 +01:00
parent 5b952616a9
commit 4638984513
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -646,7 +646,12 @@ pub fn rebuild_host(
}
let source_file = if shared_lib_path.is_some() {
cargo_cmd.env("RUSTFLAGS", "-C link-dead-code");
let rust_flags = if cfg!(windows) {
"-Z export-executable-symbols"
} else {
"-C link-dead-code"
};
cargo_cmd.env("RUSTFLAGS", rust_flags);
cargo_cmd.args(["--bin", "host"]);
"src/main.rs"
} else {