Skip to content

Expand make variables in copts and host_copts #355

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: main
Choose a base branch
from

Conversation

jhance
Copy link

@jhance jhance commented Apr 17, 2025

This mirrors behavior of rules_cc enabling things like -I$(GENDIR)/external/foo for when you need to reference a generated header.

This mirrors behavior of rules_cc enabling things like
`-I$(GENDIR)/external/foo` for when you need to reference a generated
header.
@cloudhan
Copy link
Collaborator

Could you please also add a testcase? See https://github.com/bazel-contrib/rules_cuda/blob/main/tests/flag/BUILD.bazel

@jhance
Copy link
Author

jhance commented Apr 18, 2025

Sure, but the nature of this means that I would have to hardcode an expansion that is dependent on the configuration you are running the test, right?

@cloudhan
Copy link
Collaborator

hardcode an expansion

Yes. You can control the TARGET_CPU and COMPILATION_MODE to construct a test case. see https://github.com/bazel-contrib/rules_cuda/blob/main/tests/flag/flag_validation_test.bzl on how to control them.

Also, expand_make_variables is marked as deprecated, it there any modern alternative?

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.

2 participants