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 {
1542
1542
"Expand may only be called for a single file"
1543
1543
) ;
1544
1544
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
+
1545
1560
cmd. args ( self . files . iter ( ) . map ( std:: ops:: Deref :: deref) ) ;
1546
1561
1547
1562
let name = compiler
You can’t perform that action at this time.
0 commit comments