Try fixing cross-compile test again

This commit is contained in:
Felix Schütt
2023-01-02 14:52:46 +01:00
parent 234f207f81
commit a44928e6ab

View File

@@ -1139,7 +1139,11 @@ fn link_exe_from_dir(
cmd.arg("-target"); cmd.arg("-target");
cmd.arg(&zig_triple); cmd.arg(&zig_triple);
cmd.arg("-lc"); if zig_triple.contains("windows") {
cmd.arg("-lc++");
} else {
cmd.arg("-lc");
}
let mut include_dirs = include_dirs; let mut include_dirs = include_dirs;
include_dirs.sort(); include_dirs.sort();
@@ -1156,9 +1160,8 @@ fn link_exe_from_dir(
cmd.arg("-I"); cmd.arg("-I");
cmd.arg(normalize_path(&format!("{}", include_path.display()))); cmd.arg(normalize_path(&format!("{}", include_path.display())));
if !zig_triple.contains("windows") { #[cfg(not(windows))]
cmd.arg("-lunwind"); cmd.arg("-lunwind");
}
cmd.arg("-OReleaseSafe"); cmd.arg("-OReleaseSafe");
cmd.arg("-fno-compiler-rt"); cmd.arg("-fno-compiler-rt");
cmd.arg("-fno-lto"); cmd.arg("-fno-lto");