File tree 2 files changed +8
-5
lines changed 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -701,10 +701,13 @@ impl Build {
701
701
if compiler. family . verbose_stderr ( ) {
702
702
compiler. remove_arg ( "-v" . into ( ) ) ;
703
703
}
704
- if compiler. is_like_clang ( ) {
705
- // Avoid reporting that the arg is unsupported just because the
706
- // compiler complains that it wasn't used.
707
- compiler. push_cc_arg ( "-Wno-unused-command-line-argument" . into ( ) ) ;
704
+
705
+ if compiler. supports_path_delimiter ( ) && !is_assembler_msvc {
706
+ // #513: For `clang-cl`, separate flags/options from the input file.
707
+ // When cross-compiling macOS -> Windows, this avoids interpreting
708
+ // common `/Users/...` paths as the `/U` flag and triggering
709
+ // `-Wslash-u-filename` warning.
710
+ cmd. arg ( "--" ) ;
708
711
}
709
712
710
713
let mut cmd = compiler. to_command ( ) ;
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ impl Tool {
426
426
matches ! (
427
427
self . family,
428
428
ToolFamily :: Clang { .. } | ToolFamily :: Msvc { clang_cl: true }
429
- )
429
+ ) && ! self . cuda
430
430
}
431
431
}
432
432
You can’t perform that action at this time.
0 commit comments