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

Expand make variables in defines of cc_* rules #12483

Closed
wants to merge 1 commit into from

Conversation

erenon
Copy link
Contributor

@erenon erenon commented Nov 14, 2020

To match the documented behavior:

"List of defines to add to the compile line. Subject to "Make" variable
substitution and Bourne shell tokenization."
https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary.defines

Fixes #12482

@google-cla google-cla bot added the cla: yes label Nov 14, 2020
@lberki lberki removed their request for review November 16, 2020 07:15
@oquenchil oquenchil self-assigned this Nov 16, 2020
@oquenchil oquenchil added the team-Rules-CPP Issues for C++ rules label Nov 16, 2020
Copy link
Contributor

@oquenchil oquenchil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

String.format(
"FOO=%s/foo/libfoo.a",
getTargetConfiguration()
.getBinFragment(RepositoryName.MAIN)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BuildConfiguration.getBinFragment(RepositoryName) is deprecated:
Use RuleContext#getBinFragment instead whenever possible.

Please fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased, fixed.

To match the documented behavior:

"List of defines to add to the compile line. Subject to "Make" variable
substitution and Bourne shell tokenization."
https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary.defines
@erenon
Copy link
Contributor Author

erenon commented Jan 30, 2021

Gentle reminder

@bazel-io bazel-io closed this in 28fc8a1 Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cc_* rules does not expand location make variables
2 participants