From ac5ea12e46bfef78387b803559fda975c0edfb0e Mon Sep 17 00:00:00 2001 From: roblabla Date: Tue, 8 Nov 2022 23:07:46 +0100 Subject: [PATCH] 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. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c42698698..a89e35318 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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