Skip to content

Commit

Permalink
the fmt thing
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Jul 29, 2024
1 parent e12b370 commit 96db993
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/compiler/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,12 @@ mod test {
);

assert_eq!(
ovec!["-Xarch_arm64", "-include/Path/pch_arm64.hxx", "-Xarch_x86_64", "-include/Path/pch_x86_64.hxx"],
ovec![
"-Xarch_arm64",
"-include/Path/pch_arm64.hxx",
"-Xarch_x86_64",
"-include/Path/pch_x86_64.hxx"
],
a.preprocessor_args
);
}
Expand Down
8 changes: 5 additions & 3 deletions src/compiler/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,16 +465,18 @@ where
};

match arg {
Argument::WithValue(s, PreprocessorArgument(d), ArgDisposition::Concatenated(_)) if s.starts_with("-Xarch") => {
Argument::WithValue(s, PreprocessorArgument(d), ArgDisposition::Concatenated(_))
if s.starts_with("-Xarch") =>
{
// let's get nested
if let Ok(str_data) = d.into_string() {
if let Some((arch, next_arg)) = str_data.split_once(" ") {
if let Some((arch, next_arg)) = str_data.split_once(' ') {
args.push(OsString::from(format!("{}_{}", s, arch)));
args.push(OsString::from(next_arg));
}
}
}
_ => args.extend(arg.normalize(norm).iter_os_strings())
_ => args.extend(arg.normalize(norm).iter_os_strings()),
}
}

Expand Down

0 comments on commit 96db993

Please sign in to comment.