Skip to content

Add resource_dir override #90

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keith
Copy link
Contributor

@keith keith commented Apr 30, 2025

If you vendor clang-tidy in a hermetic toolchain, it likely cannot find
the builtin headers path. To solve this you have to pass -resource-dir
to the correct path. This is similar to the new gcc option but with a
different flag.

If you vendor clang-tidy in a hermetic toolchain, it likely cannot find
the builtin headers path. To solve this you have to pass `-resource-dir`
to the correct path. This is similar to the new gcc option but with a
different flag.
@@ -40,6 +40,11 @@ def _clang_tidy_rule_impl(ctx):
rule_conlyopts = _get_copts_attr(ctx, "conlyopts")
rule_cxxopts = _get_copts_attr(ctx, "cxxopts")

files = ctx.attr.clang_tidy_resource_dir.files.to_list()
if files:
directory = files[0].path.split("/include/")[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is ugly but i think we'd have to use skylib directly to access a better api from the provider to improve this

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.

1 participant