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

fix: make CcInfo/cc dep in nodejs toolchain opt-in via include_headers attribute #3760

Merged
merged 1 commit into from
Jun 8, 2024

Conversation

gregmagolan
Copy link
Collaborator

@gregmagolan gregmagolan commented Jun 8, 2024

Fixes #3722.

Having a cc_library target always included in the headers field of the NodeInfo provided by the Node.js toolchain means that there must be always c++ toolchain available when using rules_nodejs which is not desirable. This change makes the cc_library target in headers an opt-in via the include_headers attribute.

Users can set this attribute as follows,

WORKSPACE:

load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(include_headers = True, ...)

MODULE.bazel

node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True)
node.toolchain(include_headers = True, ...)

@gregmagolan gregmagolan force-pushed the add_include_headers_option branch 4 times, most recently from 6d8c697 to afbee5a Compare June 8, 2024 15:47
@gregmagolan gregmagolan force-pushed the add_include_headers_option branch from afbee5a to 98d12b7 Compare June 8, 2024 15:47
@gregmagolan gregmagolan marked this pull request as ready for review June 8, 2024 15:51
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.

[FR]: Separate toolchain for for C++ headers
2 participants