[desktop][chore] Fix incorrect linker arguments on windows when using gnu linker(ld.exe)
This commit is contained in:
parent
96e3d36a6e
commit
e43a9fd85f
|
@ -29,7 +29,13 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
// accommodate this (the default on Linux is high enough). We
|
// accommodate this (the default on Linux is high enough). We
|
||||||
// do the same thing for wasm in web/build.rs.
|
// do the same thing for wasm in web/build.rs.
|
||||||
if std::env::var("TARGET").unwrap().contains("windows") {
|
if std::env::var("TARGET").unwrap().contains("windows") {
|
||||||
println!("cargo:rustc-link-arg=/STACK:4000000");
|
if std::env::var("TARGET").unwrap().contains("msvc") {
|
||||||
|
println!("cargo:rustc-link-arg=/STACK:4000000");
|
||||||
|
}else{
|
||||||
|
println!("cargo:rustc-link-arg=-Xlinker");
|
||||||
|
println!("cargo:rustc-link-arg=--stack");
|
||||||
|
println!("cargo:rustc-link-arg=4000000");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue