Skip to content

Fix Clang 15 build failures and add clang-15 CI job - #9419

Merged
sbc100 merged 1 commit into
mainfrom
fix-9418
Nov 21, 2026
Merged

sbc100 merged 1 commit into
mainfrom
fix-9418

Conversation

@sbc100

@sbc100 sbc100 commented Nov 21, 2026

Copy link
Copy Markdown
Member

Add constructors to Function::DebugLocation so
SmallVector::emplace_back works without C++20 parenthesized aggregate initialization (which Clang added in 16, missing in Xcode 15.4 / Apple Clang 15 after #9400). Also mark Node and SubtypeIterator equality operators const to avoid -Wambiguous-reversed-operator under Clang 15.

Add a build-clang-15 job in .github/workflows/ci.yml on ubuntu-22.04 with -stdlib=libc++ to catch older Clang / libc++ incompatibilities before they reach emsdk.

Fixes: #9418

Add constructors to `Function::DebugLocation` so
`SmallVector::emplace_back` works without C++20 parenthesized
aggregate initialization (which Clang added in 16, missing in Xcode
15.4 / Apple Clang 15 after #9400). Also mark `Node` and
`SubtypeIterator` equality operators `const` to avoid
`-Wambiguous-reversed-operator` under Clang 15.

Add a `build-clang-15` job in `.github/workflows/ci.yml` on
`ubuntu-22.04` with `-stdlib=libc++` to catch older Clang / `libc++`
incompatibilities before they reach emsdk.

Fixes: #9418
@github-actions
github-actions Bot requested a review from tlively November 21, 2026 18:45
@sbc100
sbc100 requested a review from juj November 21, 2026 18:45
Comment thread .github/workflows/ci.yml
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build clang-15 lld libc++-15-dev libc++abi-15-dev

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great to see clang-15 installable like this.. out of curiosity, are all clang versions generally available in this manner?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For any given ubuntu release I think there will be several such clang versions, and it varies with ubuntu releases.

For example on my machine I can install clang-17 - clang-22, but not earlier versions.

@sbc100
sbc100 enabled auto-merge (squash) November 21, 2026 19:03
@sbc100
sbc100 merged commit 89157cb into main Nov 21, 2026
20 checks passed
@sbc100
sbc100 deleted the fix-9418 branch November 21, 2026 19:09
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.

MacOS build is failing again on emsdk CI

2 participants