We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18307cf commit 6e800feCopy full SHA for 6e800fe
src/tool.rs
@@ -140,8 +140,17 @@ impl Tool {
140
tmp_file.sync_data()?;
141
drop(tmp_file);
142
143
+ let mut cmd = Command::new(path);
144
+ cmd.arg("-E");
145
+ if compiler.family == (ToolFamily::Msvc { clang_cl: true }) {
146
+ // #513: For `clang-cl`, separate flags/options from the input file.
147
+ // When cross-compiling macOS -> Windows, this avoids interpreting
148
+ // common `/Users/...` paths as the `/U` flag and triggering
149
+ // `-Wslash-u-filename` warning.
150
+ cmd.arg("--");
151
+ }
152
let stdout = run_output(
- Command::new(path).arg("-E").arg(tmp.path()),
153
+ cmd.arg(tmp.path()),
154
path,
155
// When expanding the file, the compiler prints a lot of information to stderr
156
// that it is not an error, but related to expanding itself.
0 commit comments