0

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.

asked Jan 13, 2025 at 22:09
1
  • 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. Commented Jan 13, 2025 at 23:13

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.