Skip to content

Commit

Permalink
Fix compilation on macOS using clang and fix compilation using zig-cc (
Browse files Browse the repository at this point in the history
…#1364)

* Fix compilation on macOS using clang and fix zig-cc

* Reenable test detecting the regression

* Fix fmt in tool.rs

* Add comment
  • Loading branch information
NobodyXu authored Jan 12, 2025
1 parent a8c9dc0 commit 9b91744
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,8 @@ impl Tool {

/// Supports using `--` delimiter to separate arguments and path to source files.
pub(crate) fn supports_path_delimiter(&self) -> bool {
matches!(
self.family,
ToolFamily::Clang { .. } | ToolFamily::Msvc { clang_cl: true }
) && !self.cuda
// homebrew clang and zig-cc does not support this while stock version does
matches!(self.family, ToolFamily::Msvc { clang_cl: true }) && !self.cuda
}
}

Expand Down
2 changes: 0 additions & 2 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,6 @@ fn gnu_static() {
}

#[test]
// on macOS, cc/gcc is link to apple clang
#[cfg_attr(target_os = "macos", ignore)]
fn gnu_no_dash_dash() {
let test = Test::gnu();
test.gcc().file("foo.c").compile("foo");
Expand Down

0 comments on commit 9b91744

Please sign in to comment.