Skip to content

gh-148832: Use -icf=0 in BOLT_APPLY_FLAGS - #148833

Merged
corona10 merged 7 commits into
python:mainfrom
ashm-dev:bolt-icf-safe
Jun 6, 2026
Merged

gh-148832: Use -icf=0 in BOLT_APPLY_FLAGS#148833
corona10 merged 7 commits into
python:mainfrom
ashm-dev:bolt-icf-safe

Conversation

@ashm-dev

@ashm-dev ashm-dev commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

@ashm-dev ashm-dev changed the title gh-148832: Use -icf=safe in BOLT_APPLY_FLAGS gh-148832: Use -icf=0 in BOLT_APPLY_FLAGS Apr 21, 2026
@corona10 corona10 self-assigned this Apr 22, 2026
@ashm-dev

Copy link
Copy Markdown
Contributor Author

@corona10 @erlend-aasland could you please review this PR?

@ashm-dev

Copy link
Copy Markdown
Contributor Author

Gentle ping — this is a small, low-risk build-flag change (-icf=0 in BOLT_APPLY_FLAGS) that's been awaiting review for ~4 weeks. @AA-Turner @emmatyping you were both auto-requested as reviewers — would either of you have a moment to take a look?

@corona10
corona10 requested a review from itamaro as a code owner June 6, 2026 06:41

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@corona10
corona10 enabled auto-merge (squash) June 6, 2026 06:41
@corona10
corona10 merged commit 2452449 into python:main Jun 6, 2026
134 of 138 checks passed
@ashm-dev
ashm-dev deleted the bolt-icf-safe branch June 6, 2026 08:49
philthompson10 pushed a commit to philthompson10/cpython that referenced this pull request Jun 17, 2026
@geofft

geofft commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

FYI I totally forgot about this until just now but #134642 uses -icf=safe on LLVM versions that support it (LLVM 20 and up) and leaves the flag out entirely on older versions. Safe ICF doesn't run into the issue with function pointer equality. Do we need to explicitly set -icf=0 instead of leaving the flag out? I think it's off by default.

@ashm-dev

Copy link
Copy Markdown
Contributor Author

@geofft AFAIK it's off by default. If you believe leaving it out causes regressions on older LLVM builds, please feel free to verify against the BOLT docs and provide a test case.

@geofft

geofft commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

No, I believe leaving it out is plenty, just wanted to confirm (since the current behavior / the behavior in this PR is to explicitly say -icf=0).

@ashm-dev

Copy link
Copy Markdown
Contributor Author

No, I believe leaving it out is plenty, just wanted to confirm (since the current behavior / the behavior in this PR is to explicitly say -icf=0).

PRs welcome. Unsubscribing from this thread.

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.

3 participants