Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,10 @@ impl Build {
cmd.args(self.asm_flags.iter().map(std::ops::Deref::deref));
}

if compiler.supports_path_delimiter() && !is_assembler_msvc {
if compiler.supports_path_delimiter()
&& !is_assembler_msvc
&& matches!(compiler.family, ToolFamily::Clang { zig_cc: false })
{
// #513: For `clang-cl`, separate flags/options from the input file.
// When cross-compiling macOS -> Windows, this avoids interpreting
// common `/Users/...` paths as the `/U` flag and triggering
Expand Down
6 changes: 6 additions & 0 deletions src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ impl Tool {
)
.map(|o| String::from_utf8_lossy(&o).contains("ziglang"))
.unwrap_or_default()
|| {
match path.file_name().map(OsStr::to_string_lossy) {
Some(fname) => fname.contains("zig"),
_ => false,
}
}
}

fn guess_family_from_stdout(
Expand Down
Loading