Skip to content

[codex] Starlarkify declare_other_output_file#760

Closed
dzbarsky wants to merge 2 commits into
bazelbuild:mainfrom
dzbarsky:codex/starlarkify-declare-other-output-file
Closed

[codex] Starlarkify declare_other_output_file#760
dzbarsky wants to merge 2 commits into
bazelbuild:mainfrom
dzbarsky:codex/starlarkify-declare-other-output-file

Conversation

@dzbarsky

Copy link
Copy Markdown
Contributor

Summary

Replace both _cc_internal.declare_other_output_file calls with actions.declare_file(..., sibling = object_file). The .dwo and ThinLTO indexing outputs keep the object file's parent directory while using the standard Starlark action API.

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

Validation

  • buildifier -mode=check -lint=warn cc/private/compile/compile.bzl
  • 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 //tests/cc/common:debug_info_packaging_tests (78 tests passed)

dzbarsky added 2 commits June 18, 2026 20:31
Declare compile outputs as shareable artifacts under the package _objs directory using the rule context. Remove the redundant configuration arguments from _get_compile_output_file and its callers.
Declare per-object debug and ThinLTO indexing outputs beside the object file with actions.declare_file. This preserves the object file parent directory without calling the native helper.
@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