about summary refs log tree commit diff
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2025-02-07 13:01:15 -0500
committerGitHub <noreply@github.com>2025-02-07 13:01:15 -0500
commitf5597ff7e9ce2265f1b7803920d300e80504368a (patch)
tree0dad09167d47e01be127dbbe73c20f2edca9fbb5
parent438056890df8696cfa20e0058b8093dfbc3e9ec9 (diff)
parent09d907627b6f86fae8cc926a353a44bd723ccf59 (diff)
downloadrust-f5597ff7e9ce2265f1b7803920d300e80504368a.tar.gz
rust-f5597ff7e9ce2265f1b7803920d300e80504368a.zip
Merge pull request #624 from folkertdev/run-asm-tests
fix backslashes in path used for `asm_tests`
-rw-r--r--build_system/src/test.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/build_system/src/test.rs b/build_system/src/test.rs
index efd7b2b8df3..096b4c4a715 100644
--- a/build_system/src/test.rs
+++ b/build_system/src/test.rs
@@ -542,20 +542,21 @@ fn asm_tests(env: &Env, args: &TestArg) -> Result<(), String> {
 
     env.insert("COMPILETEST_FORCE_STAGE0".to_string(), "1".to_string());
 
-    let extra =
-        if args.is_using_gcc_master_branch() { "" } else { " -Csymbol-mangling-version=v0" };
-
-    let rustc_args = &format!(
-        r#"-Zpanic-abort-tests \
-            -Zcodegen-backend="{pwd}/target/{channel}/librustc_codegen_gcc.{dylib_ext}" \
-            --sysroot "{sysroot_dir}" -Cpanic=abort{extra}"#,
+    let codegen_backend_path = format!(
+        "{pwd}/target/{channel}/librustc_codegen_gcc.{dylib_ext}",
         pwd = std::env::current_dir()
             .map_err(|error| format!("`current_dir` failed: {:?}", error))?
             .display(),
         channel = args.config_info.channel.as_str(),
         dylib_ext = args.config_info.dylib_ext,
-        sysroot_dir = args.config_info.sysroot_path,
-        extra = extra,
+    );
+
+    let extra =
+        if args.is_using_gcc_master_branch() { "" } else { " -Csymbol-mangling-version=v0" };
+
+    let rustc_args = format!(
+        "-Zpanic-abort-tests -Zcodegen-backend={codegen_backend_path} --sysroot {} -Cpanic=abort{extra}",
+        args.config_info.sysroot_path
     );
 
     run_command_with_env(