[codex] Starlarkify get_artifact_name_extension_for_category#759
Closed
dzbarsky wants to merge 2 commits into
Closed
[codex] Starlarkify get_artifact_name_extension_for_category#759dzbarsky wants to merge 2 commits into
dzbarsky wants to merge 2 commits into
Conversation
Store artifact name pattern overrides on CcToolchainInfo and apply them from Starlark in cc_common, compile, and link callers. Match default-pattern filtering and PathFragment normalization from the Java implementation.
Read the configured artifact name pattern override from CcToolchainInfo and fall back to the category default extension. Use the Starlark helper when constructing ThinLTO link variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
_cc_internal.get_artifact_name_extension_for_categorywith a Starlarkget_artifact_name_extension_for_categoryimplementation. The helper reads the artifact name pattern override stored onCcToolchainInfoby #757 and otherwise returns the artifact category's default extension.link_build_variables.bzluses the Starlark helper when constructingthinlto_object_suffix_replace.This PR is stacked on #757. Its diff against
mainincludes #757 until #757 merges.Validation
buildifier -mode=check -lint=warnon all changed Starlark filesbazel test --jobs=2 //tests/cc/common:cc_common_tests //tests/cc/common:cc_binary_configured_target_tests //tests/cc/common:cc_library_configured_target_tests(73 tests passed)