Skip to content

Commit

Permalink
Do not use -- for cuda
Browse files Browse the repository at this point in the history
Signed-off-by: Jiahao XU <[email protected]>
  • Loading branch information
NobodyXu committed Jan 6, 2025
1 parent 2161803 commit 76f4f6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,13 @@ impl Build {
if compiler.family.verbose_stderr() {
compiler.remove_arg("-v".into());
}
if compiler.is_like_clang() {
// Avoid reporting that the arg is unsupported just because the
// compiler complains that it wasn't used.
compiler.push_cc_arg("-Wno-unused-command-line-argument".into());

if compiler.supports_path_delimiter() && !is_assembler_msvc {
// #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
// `-Wslash-u-filename` warning.
cmd.arg("--");
}

let mut cmd = compiler.to_command();
Expand Down
2 changes: 1 addition & 1 deletion src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ impl Tool {
matches!(
self.family,
ToolFamily::Clang { .. } | ToolFamily::Msvc { clang_cl: true }
)
) && !self.cuda
}
}

Expand Down

0 comments on commit 76f4f6c

Please sign in to comment.