Skip to content

[codex] Move legacy whole-archive flags to the graveyard#29939

Draft
dzbarsky wants to merge 1 commit into
bazelbuild:masterfrom
dzbarsky:codex/remove-legacy-whole-archive-flags
Draft

[codex] Move legacy whole-archive flags to the graveyard#29939
dzbarsky wants to merge 1 commit into
bazelbuild:masterfrom
dzbarsky:codex/remove-legacy-whole-archive-flags

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

--incompatible_remove_legacy_whole_archive was introduced disabled in February 2019 by e5735fd27d and enabled by default in September 2019 by 799328f8e0. --legacy_whole_archive was retained as a rollback control and only affected builds that explicitly restored the pre-migration behavior.

This moves both flags out of CppOptions, returns the established values from the private Starlark compatibility accessors, and retains deprecated graveyard no-ops so existing command lines remain accepted. The linking tests now cover the established behavior without rollback flags.

The rules_cc dead-code cleanup is bazelbuild/rules_cc#768.

Validation: bazel test --jobs=3 --disk_cache=/private/tmp/bazel-pr-disk-cache //src/test/java/com/google/devtools/build/lib/packages/semantics:ConsistencyTest //src/test/java/com/google/devtools/build/lib/rules/cpp:CppLinkActionTest //src/test/java/com/google/devtools/build/lib/rules/cpp:LibraryLinkingTest.

@keith

keith commented Jun 22, 2026

Copy link
Copy Markdown
Member

this one is still used in google

--incompatible_remove_legacy_whole_archive was introduced disabled in February 2019 by e5735fd and enabled by default in September 2019 by 799328f. Since then, --legacy_whole_archive only affected builds that explicitly restored the pre-migration behavior.

Return the established values from the private Starlark compatibility accessors and retain deprecated graveyard no-ops so existing command lines remain accepted. Update the linking tests to cover the established behavior.

RELNOTES: --legacy_whole_archive and --incompatible_remove_legacy_whole_archive are now deprecated no-ops.
@dzbarsky dzbarsky force-pushed the codex/remove-legacy-whole-archive-flags branch from 701d78d to 15cdc1a Compare June 23, 2026 13:13
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.

2 participants