From cb3a9a19ff9f3119425e3787ede0454520ca1800 Mon Sep 17 00:00:00 2001 From: Mark Drobnak Date: Mon, 25 Jul 2022 21:27:58 -0700 Subject: [PATCH] Set build-std flag before trailing arguments --- src/lib.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9337deb..9d43156 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -126,17 +126,19 @@ pub fn make_cargo_build_command( .arg("--target") .arg("armv6k-nintendo-3ds") .arg("--message-format") - .arg(message_format) - .args(args) - .stdout(Stdio::piped()) - .stdin(Stdio::inherit()) - .stderr(Stdio::inherit()); + .arg(message_format); if !sysroot.join("lib/rustlib/armv6k-nintendo-3ds").exists() { eprintln!("No pre-build std found, using build-std"); command.arg("-Z").arg("build-std"); } + command + .args(args) + .stdout(Stdio::piped()) + .stdin(Stdio::inherit()) + .stderr(Stdio::inherit()); + command }