Skip to content

Declare prefer_pic_for_opt_binaries feature, disabled by default - #27

Merged
gartnera merged 1 commit into
masterfrom
prefer-pic-for-opt-binaries
Oct 7, 2026
Merged

gartnera merged 1 commit into
masterfrom
prefer-pic-for-opt-binaries

Conversation

@gartnera

@gartnera gartnera commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Lets consumers opt in with --features=prefer_pic_for_opt_binaries so opt builds compile each source once (as PIC) instead of a .pic.o plus a non-PIC .o for static cc_binary links. Previously the flag was silently ignored because the toolchain didn't declare the feature.

We just need to declare this and rules_cc does the rest.

Lets consumers opt in with --features=prefer_pic_for_opt_binaries so opt
builds compile each source once (as PIC) instead of a .pic.o plus a
non-PIC .o for static cc_binary links. Previously the flag was silently
ignored because the toolchain didn't declare the feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gartnera
gartnera force-pushed the prefer-pic-for-opt-binaries branch from 1654a37 to 8a6b4d4 Compare October 7, 2026 19:38
@gartnera
gartnera merged commit fb3b178 into master Oct 7, 2026
7 checks passed
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