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

Set copt for internal tools like make and pkgconfig #1333

Open
mering opened this issue Nov 29, 2024 · 3 comments
Open

Set copt for internal tools like make and pkgconfig #1333

mering opened this issue Nov 29, 2024 · 3 comments

Comments

@mering
Copy link

mering commented Nov 29, 2024

Please add some way to pass compiler flags for building the rules_foreign_cc internal tools.

We want to build our own code base with -Werror but we don't have a way to disable warnings for those external tool we don't have control over.

@keith
Copy link
Member

keith commented Dec 2, 2024

rules_foreign_cc could definitely expose some starlark flags for this type of thing. I think using --host_copt does apply to some of these now, but that might be too wide for what you want. You could also patch in the flags until this is resolved:

"CFLAGS": _join_flags_list(ctx.workspace_name, non_sysroot_cflags),

@mering
Copy link
Author

mering commented Dec 3, 2024

@keith Thanks for the code hint. Although I explicitly want to enable -Werror also for --host_copt to build all of our own tools with -Werror as well.

@jsharpe
Copy link
Member

jsharpe commented Dec 6, 2024

PRs would be welcome in this area but this isn't something that I'll have bandwidth to get to doing anytime in the near future.

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

No branches or pull requests

3 participants