Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-92984 The Windows build of Python does not need incremental linker support for release and PGO builds #92985

Merged
merged 3 commits into from
May 19, 2022
Merged

gh-92984 The Windows build of Python does not need incremental linker support for release and PGO builds #92985

merged 3 commits into from
May 19, 2022

Conversation

dmachaj
Copy link
Contributor

@dmachaj dmachaj commented May 19, 2022

Closes #92984

This PR disables the incremental linker option for Windows builds when compiling Release or PGO. This configuration change equates to the /INCREMENTAL:NO linker option.

Debug builds were not changed. Incremental linking is more likely to be useful there.

This change was tested by compiling the project using pcbuild/build.bat --pgo. When run on the main branch with no changes the resulting binaries could not be analyzed in some tools because of incremental linking (even though it wasn't actually incremental). After this change and a recompile of everything the resulting binary could be analyzed.

@dmachaj dmachaj requested a review from a team as a code owner May 19, 2022 20:32
@cpython-cla-bot
Copy link

cpython-cla-bot bot commented May 19, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

PCbuild/pyproject.props Outdated Show resolved Hide resolved
@zooba
Copy link
Member

zooba commented May 19, 2022

For the NEWS entry (which you can create by running PCbuild/blurb.bat), just put "Explicitly disable incremental linking for non-Debug builds" and put it in the Windows category.

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@dmachaj
Copy link
Contributor Author

dmachaj commented May 19, 2022

For the NEWS entry (which you can create by running PCbuild/blurb.bat), just put "Explicitly disable incremental linking for non-Debug builds" and put it in the Windows category.

Thanks for pointing me to that script. That was pretty easy to run and is now included.

@zooba zooba merged commit 38feffa into python:main May 19, 2022
@zooba
Copy link
Member

zooba commented May 19, 2022

I'm going to run a test release build with this before backporting, just to be sure nothing breaks. But ILK should've been off anyway because of LTCG, so nothing should actually change.

@zooba zooba added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels May 19, 2022
@miss-islington
Copy link
Contributor

Thanks @dmachaj for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @dmachaj for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-92990 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label May 19, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 19, 2022
…lease and PGO builds (pythonGH-92985)

(cherry picked from commit 38feffa)

Co-authored-by: David Machaj <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 19, 2022
@bedevere-bot
Copy link

GH-92991 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 19, 2022
…lease and PGO builds (pythonGH-92985)

(cherry picked from commit 38feffa)

Co-authored-by: David Machaj <[email protected]>
miss-islington added a commit that referenced this pull request May 19, 2022
…and PGO builds (GH-92985)

(cherry picked from commit 38feffa)

Co-authored-by: David Machaj <[email protected]>
miss-islington added a commit that referenced this pull request May 19, 2022
…and PGO builds (GH-92985)

(cherry picked from commit 38feffa)

Co-authored-by: David Machaj <[email protected]>
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.

The Windows build of Python does not need incremental linker support for release and PGO builds
4 participants