I'm writing my own bazel toolchain. As part of the toolchain, I decided to add the cmd action "-process_headers_in_dependencies".
I understood that the action for this feature is "c++-header-parsing". To enable this feature, I read that this feature apply only for toolchain that support modules. """ Run the compiler's parser on a header file to ensure that the header is self-contained, as it will otherwise produce compilation errors. Applies only to toolchains that support modules. """
and how can I add it to my toolchain?
Note - I look into bazels default toolchain, I saw that they add a feature for the action "c++-header-parsing" and passing the flags "-fsyntax-only" and "cx++-header" Maybe it belongs.
Thanks a lot.
As I have added above, I have tried to add the feature parse_headers with the following action "c++-header-parsing" which didn't work for me. I still haven't been able to compile the header only with the cmd line flag and raise an error for failure.
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Community– Community Bot2025年01月13日 23:13:25 +00:00Commented Jan 13, 2025 at 23:13