Expand make variables in copts and host_copts#355
Expand make variables in copts and host_copts#355jhance wants to merge 1 commit intobazel-contrib:mainfrom
Conversation
This mirrors behavior of rules_cc enabling things like `-I$(GENDIR)/external/foo` for when you need to reference a generated header.
|
Could you please also add a testcase? See https://github.com/bazel-contrib/rules_cuda/blob/main/tests/flag/BUILD.bazel |
|
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? |
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, |
|
Upstream deprecated it without replacement, see bazelbuild/bazel#5859. I am confused as to why it is deprecated. It looks like rules_cc implemented a tokenizer in starlark to avoid this? That's hardly reasonable/better. The alternative would be to use {} and .format() but then the way you specify the strings would be different between cuda and cc library |
|
Can you fix the CI failures, seems everyone is relying on the deprecated feature, as long as it is not removed. |
This mirrors behavior of rules_cc enabling things like
-I$(GENDIR)/external/foofor when you need to reference a generated header.