Skip to content

fix compiler detection to use CCX instead of CC#28

Merged
Firestar99 merged 5 commits intomainfrom
clang
Apr 7, 2026
Merged

fix compiler detection to use CCX instead of CC#28
Firestar99 merged 5 commits intomainfrom
clang

Conversation

@Firestar99
Copy link
Copy Markdown
Member

@Firestar99 Firestar99 commented Apr 1, 2026

  • fix spirv-tools not building with clang due to unknown option -Wno-stringop-overflow
  • add ci testing with clang
  • don't error on warnings by default, to prevent compilers adding warnings in the future from failing builds for end users
  • I tried setting up windows with clang and gcc CI, but setting CCX makes the cc crate think it's still an msvc compiler instead of a clang / gcc compiler, so everything just fails. works now

@Firestar99 Firestar99 force-pushed the clang branch 4 times, most recently from b66a59f to 72bd683 Compare April 1, 2026 11:17
@Firestar99 Firestar99 changed the title test clang fix clang Apr 1, 2026
@Firestar99 Firestar99 force-pushed the clang branch 2 times, most recently from fe88ebd to 27c35d6 Compare April 1, 2026 11:49
@Firestar99 Firestar99 force-pushed the clang branch 2 times, most recently from 600e447 to b8ac4f5 Compare April 1, 2026 12:10
@Firestar99 Firestar99 marked this pull request as ready for review April 1, 2026 12:29
Comment on lines 121 to -127
if compiler.is_like_gnu() {
build
.flag("-Wall")
.flag("-Wextra")
.flag("-Wnon-virtual-dtor")
.flag("-Wno-missing-field-initializers")
.flag("-Wno-stringop-overflow")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If is_like_gnu is telling a lie then i think there's something wrong?

Copy link
Copy Markdown
Member Author

@Firestar99 Firestar99 Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can guess by that, the compiler detection wasn't working correctly. build.cpp(true) changes compiler kind detection to use the CCX env instead of CC, so this must be set before matching on the compiler kind.

Copy link
Copy Markdown

@nnethercote nnethercote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me but I don't really know anything about this code.

@Firestar99 Firestar99 marked this pull request as draft April 7, 2026 09:29
`build.cpp(true)` changes compiler kind detection to use CCX instead of CC, so this must be set before matching on the compiler kind
@Firestar99 Firestar99 changed the title fix clang fix compiler kind detection to use CCX instead of CC Apr 7, 2026
@Firestar99 Firestar99 self-assigned this Apr 7, 2026
@Firestar99 Firestar99 marked this pull request as ready for review April 7, 2026 10:10
@Firestar99 Firestar99 enabled auto-merge (rebase) April 7, 2026 10:10
@Firestar99 Firestar99 disabled auto-merge April 7, 2026 10:23
@Firestar99 Firestar99 merged commit 00d966d into main Apr 7, 2026
11 checks passed
@Firestar99 Firestar99 deleted the clang branch April 7, 2026 10:23
@Firestar99 Firestar99 changed the title fix compiler kind detection to use CCX instead of CC fix compiler detection to use CCX instead of CC Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants