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

bazel: add target_compatible_with to envoy_cc_library #22273

Conversation

keith
Copy link
Member

@keith keith commented Jul 18, 2022

This attribute allows us to specify what constraints a library is
compatible with, such as only usable on linux, or not windows etc. It
is viral in that any targets that explicitly depend on it up the tree
will respect those constraints, and not be built, unless they're
specified explicitly on the command line, in which case bazel will fail
instead. This helps us a fix a problem with the compilation database
script where it virtually does bazel build //..., but some libraries
don't build at all on some platforms. Theoretically we could also solve
this case by marking those libraries as manual, but that would have
other side effects in that they wouldn't be built on the platforms that
they support either (unless they were somehow otherwise part of the
dependency tree, since unlike this attribute, the manual tag is not
viral).

Signed-off-by: Keith Smiley keithbsmiley@gmail.com

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #22273 was opened by keith.

see: more, trace.

@keith
Copy link
Member Author

keith commented Jul 18, 2022

This would require pulling in grailbio/bazel-compilation-database#100 to actually solve #22217

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 17, 2022
@keith keith removed the stale stalebot believes this issue/PR has not been touched recently label Aug 19, 2022
This attribute allows us to specify what constraints a library is
compatible with, such as only usable on linux, or not windows etc. It
is viral in that any targets that explicitly depend on it up the tree
will respect those constraints, and not be built, unless they're
specified explicitly on the command line, in which case bazel will fail
instead. This helps us a fix a problem with the compilation database
script where it virtually does `bazel build //...`, but some libraries
don't build at all on some platforms. Theoretically we could also solve
this case by marking those libraries as `manual`, but that would have
other side effects in that they wouldn't be built on the platforms that
they support either (unless they were somehow otherwise part of the
dependency tree, since unlike this attribute, the `manual` tag is not
viral).

Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
@keith keith force-pushed the ks/bazel-add-target_compatible_with-to-envoy_cc_library branch from 4456707 to 1e72e3f Compare August 19, 2022 16:41
@keith
Copy link
Member Author

keith commented Aug 19, 2022

I think with the newest rolling release this should work without the change linked above

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 18, 2022
@github-actions
Copy link

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot closed this Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant