File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1542,6 +1542,21 @@ impl Build {
15421542 "Expand may only be called for a single file"
15431543 ) ;
15441544
1545+ let is_asm = self
1546+ . files
1547+ . iter ( )
1548+ . map ( std:: ops:: Deref :: deref)
1549+ . find_map ( AsmFileExt :: from_path)
1550+ . is_some ( ) ;
1551+
1552+ if compiler. family == ( ToolFamily :: Msvc { clang_cl : true } ) && !is_asm {
1553+ // #513: For `clang-cl`, separate flags/options from the input file.
1554+ // When cross-compiling macOS -> Windows, this avoids interpreting
1555+ // common `/Users/...` paths as the `/U` flag and triggering
1556+ // `-Wslash-u-filename` warning.
1557+ cmd. arg ( "--" ) ;
1558+ }
1559+
15451560 cmd. args ( self . files . iter ( ) . map ( std:: ops:: Deref :: deref) ) ;
15461561
15471562 let name = compiler
You can’t perform that action at this time.
0 commit comments