Skip to content

Commit

Permalink
Don't separate files/opt when using msvc assembler
Browse files Browse the repository at this point in the history
The MSVC assemblers don't support using `--` to mark the end of the
options and the start of the "verbatim" file list. When the compiler
family is MSVC with clang-cl, the assembler used will be the standard
MSVC assembler.
  • Loading branch information
roblabla authored and thomcc committed Nov 8, 2022
1 parent 1c8b4a0 commit 0e5b395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -1345,7 +1345,7 @@ impl Build {
if self.cuda && self.files.len() > 1 {
cmd.arg("--device-c");
}
if compiler.family == (ToolFamily::Msvc { clang_cl: true }) {
if compiler.family == (ToolFamily::Msvc { clang_cl: true }) && !is_asm {
// #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

0 comments on commit 0e5b395

Please sign in to comment.