Skip to content

[codex] Starlarkify get_artifact_name_extension_for_category#759

Closed
dzbarsky wants to merge 2 commits into
bazelbuild:mainfrom
dzbarsky:codex/starlarkify-get-artifact-name-extension-for-category
Closed

[codex] Starlarkify get_artifact_name_extension_for_category#759
dzbarsky wants to merge 2 commits into
bazelbuild:mainfrom
dzbarsky:codex/starlarkify-get-artifact-name-extension-for-category

Conversation

@dzbarsky

Copy link
Copy Markdown
Contributor

Summary

Replace _cc_internal.get_artifact_name_extension_for_category with a Starlark get_artifact_name_extension_for_category implementation. The helper reads the artifact name pattern override stored on CcToolchainInfo by #757 and otherwise returns the artifact category's default extension.

link_build_variables.bzl uses the Starlark helper when constructing thinlto_object_suffix_replace.

This PR is stacked on #757. Its diff against main includes #757 until #757 merges.

Validation

  • buildifier -mode=check -lint=warn on all changed Starlark files
  • bazel 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)

dzbarsky added 2 commits June 18, 2026 20:26
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.
@dzbarsky dzbarsky closed this Jun 19, 2026
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.

1 participant