Skip to content

Commit

Permalink
Merge pull request #624 from folkertdev/run-asm-tests
Browse files Browse the repository at this point in the history
fix backslashes in path used for `asm_tests`
  • Loading branch information
antoyo authored Feb 7, 2025
2 parents 4380568 + 09d9076 commit f5597ff
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions build_system/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f5597ff

Please sign in to comment.