Skip to content

Commit 21d4b27

Browse files
committed
Fix build script cargo instructions
1 parent 590e574 commit 21d4b27

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

build.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ fn from_build() -> Result<String, String> {
1313
}
1414

1515
fn main() {
16-
println!("cargo:rerun-if-env-changed=RUSTUP_OVERRIDE_BUILD_TRIPLE");
17-
println!("cargo:rerun-if-env-changed=TARGET");
16+
println!("cargo::rerun-if-env-changed=RUSTUP_OVERRIDE_BUILD_TRIPLE");
17+
println!("cargo::rerun-if-env-changed=TARGET");
1818
match from_build() {
1919
Ok(triple) => eprintln!("Computed build based on target triple: {triple:#?}"),
2020
Err(s) => {
@@ -26,7 +26,7 @@ fn main() {
2626
}
2727
}
2828
let target = env::var("TARGET").unwrap();
29-
println!("cargo:rustc-env=TARGET={target}");
29+
println!("cargo::rustc-env=TARGET={target}");
3030

3131
// Set linker options specific to Windows MSVC.
3232
let target_os = env::var("CARGO_CFG_TARGET_OS");
@@ -40,7 +40,7 @@ fn main() {
4040
// This applies to DLLs loaded at load time. However, this setting is ignored
4141
// before Windows 10 RS1 (aka 1601).
4242
// https://learn.microsoft.com/en-us/cpp/build/reference/dependentloadflag?view=msvc-170
43-
println!("cargo:cargo:rustc-link-arg-bin=rustup-init=/DEPENDENTLOADFLAG:0x800");
43+
println!("cargo::rustc-link-arg-bin=rustup-init=/DEPENDENTLOADFLAG:0x800");
4444

4545
// # Delay load
4646
//
@@ -55,16 +55,16 @@ fn main() {
5555
// See also: src/bin/rustup-init.rs
5656
let delay_load_dlls = ["bcrypt", "api-ms-win-core-synch-l1-2-0"];
5757
for dll in delay_load_dlls {
58-
println!("cargo:rustc-link-arg-bin=rustup-init=/delayload:{dll}.dll");
58+
println!("cargo::rustc-link-arg-bin=rustup-init=/delayload:{dll}.dll");
5959
}
6060
// When using delayload, it's necessary to also link delayimp.lib
6161
// https://learn.microsoft.com/en-us/cpp/build/reference/dependentloadflag?view=msvc-170
62-
println!("cargo:rustc-link-arg-bin=rustup-init=delayimp.lib");
62+
println!("cargo::rustc-link-arg-bin=rustup-init=delayimp.lib");
6363

6464
// # Turn linker warnings into errors
6565
//
6666
// Rust hides linker warnings meaning mistakes may go unnoticed.
6767
// Turning them into errors forces them to be displayed (and the build to fail).
6868
// If we do want to ignore specific warnings then `/IGNORE:` should be used.
69-
println!("cargo:rustc-link-arg-bin=rustup-init=/WX");
69+
println!("cargo::rustc-link-arg-bin=rustup-init=/WX");
7070
}

0 commit comments

Comments
 (0)