Repository navigation
Conversation
This was referenced Oct 22, 2026
zaniebot
force-pushed
the
zb/relocatable-flag-ii-bolt
branch
from
October 22, 2026 22:52
822cf72 to
bc60b61
Compare
zanieb
added this pull request to stack #57
October 22, 2026 22:53
zaniebot
removed this pull request from stack #57
October 22, 2026 22:59
zaniebot
added this pull request to stack #58
October 22, 2026 22:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CPython's BOLT rules optimize the build-tree binaries that
make installcopies into the installation, including sharedlibpythonsupport from python#104709. The separate installation binaries introduced by #48 would otherwise be installed without BOLT optimization. Those binaries need different runtime library paths because an installed-layoutDT_RPATHcan override the build tree's intendedlibpythonon glibc.PBS's build script builds and installs CPython before rewriting the installed ELF library paths with
patchelf. When BOLT is enabled, this edits an already optimized binary without relinking it, so no separately linked installation binary needs BOLT optimization. The downstream draft astral-sh/python-build-standalone#861 adopts separate installation binaries and includes the additional BOLT profile application for them.Allow
--enable-boltwith--enable-relocatableby applying the build-tree profiles to the installation counterparts, which are linked from the same object files. Collecting profiles with the build-tree binaries uses their build-time library lookup and avoids a second training run. Optimize installation libraries before the interpreter so their newer timestamps do not cause installation to relink the interpreter and discard its BOLT output. Refresh the shared-library alias only when BOLT optimized that library, and include installation copies in.preboltcleanup.This extends BOLT to the additional link outputs required by #48. The #49 alternative uses
DT_RUNPATHand shares build and installation binaries, so it uses the ordinary BOLT rules.Stacked on #48.