Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force use of Clang over C++ modules with use_module_maps #22660

Closed
wants to merge 2 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Jun 6, 2024

With -std=c++20, Clang defaults to using C++ modules rather than Clang modules, which can result in failures when using layering_check and thus use_module_maps.

Fixes bazel-contrib/toolchains_llvm#334

With `-std=c++20`, Clang defaults to using C++ modules rather than Clang modules, which can result in failures when using `layering_check` and thus `use_module_maps`.
@github-actions github-actions bot added team-Rules-CPP Issues for C++ rules awaiting-review PR is awaiting review from an assigned reviewer labels Jun 6, 2024
@fmeum fmeum requested a review from oquenchil June 6, 2024 15:12
@fmeum
Copy link
Collaborator Author

fmeum commented Jun 6, 2024

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jun 6, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Jun 6, 2024

@oquenchil The flag unfortunately requires clang-14: llvm/llvm-project@0556138

I will add version detection logic.

@keertk
Copy link
Member

keertk commented Jun 6, 2024

@bazel-io fork 7.3.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Jun 6, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Jun 7, 2024

I added feature detection.

@oquenchil oquenchil added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jun 7, 2024
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Jun 12, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Jun 12, 2024
With `-std=c++20`, Clang defaults to using C++ modules rather than Clang modules, which can result in failures when using `layering_check` and thus `use_module_maps`.

Fixes bazel-contrib/toolchains_llvm#334

Closes bazelbuild#22660.

PiperOrigin-RevId: 642548168
Change-Id: Ie1dd4c482d716635f7b6c53ffd3c5d84b6aa8cc2
@fmeum fmeum deleted the no-cxx-modules branch June 12, 2024 09:57
github-merge-queue bot pushed a commit that referenced this pull request Jun 17, 2024
…22720)

With `-std=c++20`, Clang defaults to using C++ modules rather than Clang
modules, which can result in failures when using `layering_check` and
thus `use_module_maps`.

Fixes bazel-contrib/toolchains_llvm#334

Closes #22660.

PiperOrigin-RevId: 642548168
Change-Id: Ie1dd4c482d716635f7b6c53ffd3c5d84b6aa8cc2

Commit
9e913fb

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 7.3.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.3.0rc1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-CPP Issues for C++ rules
Projects
None yet
6 participants