Skip to content

Commit 0e5b395

Browse files
roblablathomcc
authored andcommitted
Don't separate files/opt when using msvc assembler
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.
1 parent 1c8b4a0 commit 0e5b395

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ impl Build {
13451345
if self.cuda && self.files.len() > 1 {
13461346
cmd.arg("--device-c");
13471347
}
1348-
if compiler.family == (ToolFamily::Msvc { clang_cl: true }) {
1348+
if compiler.family == (ToolFamily::Msvc { clang_cl: true }) && !is_asm {
13491349
// #513: For `clang-cl`, separate flags/options from the input file.
13501350
// When cross-compiling macOS -> Windows, this avoids interpreting
13511351
// common `/Users/...` paths as the `/U` flag and triggering

0 commit comments

Comments
 (0)