Skip to content

Conversation

al45tair
Copy link
Contributor

We need to do this because otherwise libc++ fails to build, since the clang we pick up from the Swift install is an older version than the one libc++ requires (libc++ currently needs Clang 19; we ship Clang 17 with Swift).

We need to do this because otherwise libc++ fails to build, since the
clang we pick up from the Swift install is an older version than the
one libc++ requires (libc++ currently needs Clang 19; we ship Clang
17 with Swift).
@al45tair
Copy link
Contributor Author

(I'm still testing this locally, but I think this should fix the problem that we're seeing.)

`-Werror` is a stupid option; it basically breaks the build whenever
a newer compiler adds a new warning that triggers in your code.  We
don't need it here, so disable it.
@al45tair
Copy link
Contributor Author

It turns out that BoringSSL's -Werror causes a build failure if you use a newer compiler. So we need to turn that off. Still testing.

@al45tair
Copy link
Contributor Author

This built successfully locally, with the rebranch checkout.

Comment on lines +289 to +290
run cmake -G Ninja -S ${source_dir}/swift-project/llvm-project/llvm \
-B ${build_dir}/host/clang \
Copy link

@AnthonyLatsis AnthonyLatsis Sep 22, 2025

Choose a reason for hiding this comment

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

Why does this work with the source dir being llvm-project/llvm instead of llvm-project/clang?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It actually doesn't work with the source dir being llvm-project/clang (that's the first thing I tried). Using llvm rather than clang is actually what the instructions here say to do.

@shahmishal shahmishal merged commit 75210db into swiftlang:main Sep 23, 2025
1 check passed
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