Add parse_headers support to the default Unix toolchain#21560
Add parse_headers support to the default Unix toolchain#21560fmeum wants to merge 2 commits intobazelbuild:masterfrom
parse_headers support to the default Unix toolchain#21560Conversation
| # parsing failures for C headers that are not valid C++. | ||
| # For such headers, use features = ["-parse_headers"] to selectively | ||
| # disable parsing. | ||
| "-xc++-header", |
There was a problem hiding this comment.
looks like there is also -xc-header if this is a major issue
There was a problem hiding this comment.
We could add a separate feature for that flag as a follow-up. The problem is that Bazel can't tell whether a given header should be treated as C or C++.
There was a problem hiding this comment.
Making this more concrete: I could submit a follow-up PR that defines two more features, parse_headers_as_cpp (default) and parse_headers_as_c, that can be combined with parse_headers.
|
@bazel-io fork 7.1.0 |
|
@iancha1992 This is not a hard blocker for the 7.1.0 release, but getting it in there would help maintaining C++ modules in the BCR (cc @meteorcloudy). |
|
@fmeum do you still want to merge this? |
|
@iancha1992 Yes, it's just waiting for a review. @comius Friendly ping :-) |
|
@pzembrod I unassigned Ivo and moved this over to you. Let me know if you have any questions! |
|
@pzembrod Is this still on track for 7.2.0? We're aiming for RC1 next Monday. |
22e2131 to
6c59953
Compare
RELNOTES: The default Unix C++ toolchain now supports the `parse_headers` to validate header files with `--process_headers_in_dependencies`.
Also remove Ubuntu 16.04 workarounds from layering_check tests. RELNOTES: The default Unix C++ toolchain now supports the `parse_headers` feature to validate header files with `--process_headers_in_dependencies`. Closes bazelbuild#21560. PiperOrigin-RevId: 633657012 Change-Id: Iaaa2623bcc86b219b02567eca1c7bf9e1a77ae7d
…2369) Also remove Ubuntu 16.04 workarounds from layering_check tests. RELNOTES: The default Unix C++ toolchain now supports the `parse_headers` feature to validate header files with `--process_headers_in_dependencies`. Closes #21560. PiperOrigin-RevId: 633657012 Change-Id: Iaaa2623bcc86b219b02567eca1c7bf9e1a77ae7d Fixes #22361 Commit 231dfc2
|
The changes in this PR have been included in Bazel 7.2.0 RC1. Please test out the release candidate and report any issues as soon as possible. |
This feature enables bazel to validate "C++" header files through clang. Without this you only get this type of validating when you actually include the library elsewhere. Similar to layering_check we have to validate this outside of normal bazel because we are expecting build failures and need to parse the logs This mirrors bazelbuild/bazel#21560
This feature enables bazel to validate "C++" header files through clang. Without this you only get this type of validating when you actually include the library elsewhere. Similar to layering_check we have to validate this outside of normal bazel because we are expecting build failures and need to parse the logs This mirrors bazelbuild/bazel#21560
Also remove Ubuntu 16.04 workarounds from layering_check tests.
RELNOTES: The default Unix C++ toolchain now supports the
parse_headersfeature to validate header files with--process_headers_in_dependencies.