Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-131278: Support building using "computed gotos" for clang-cl on Windows#131279

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zooba merged 9 commits intopython:mainfromchris-eibl:param_cg
Mar 17, 2025

Conversation

@chris-eibl
Copy link
Member

@chris-eiblchris-eibl commentedMar 15, 2025
edited by bedevere-appbot
Loading

Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

Some readability comments. Do you want to actually add a What's New as well? (I don't know how wide is the audience)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@Fidget-Spinner
Copy link
Member

I don't remember if we had a Whats New for the original clang-cl issue. We should definitely mention in the whats new that clang cl building on Windows is now possible, and say PGO too.

@Fidget-Spinner
Copy link
Member

Woops sorry pressed the wrong button!

picnixz and chris-eibl reacted with laugh emoji

@picnixz
Copy link
Member

@chris-eibl How do you plan to address:

We should definitely mention in the whats new that clang cl building on Windows is now possible, and say PGO too.

Are there more PRs for those kind of optimizations on Windows? if so, we can delay everything until they are done. Otherwise, let's mention that in the What's New entry

@chris-eibl
Copy link
MemberAuthor

I don't remember if we had a Whats New for the original clang-cl issue. We should definitely mention in the whats new that clang cl building on Windows is now possible, and say PGO too.

Building with clang-cl has been possible for a very long time:#101352.

The only fixes I am aware of are just these two (and just main and current 3.14 alphas are/have been affected):

So maybe just mention PGO in the Whats New?
Maybe this here and-flto=thin, too?

@zooba treats clang-cl as quite optional in#129907 (comment)
but I think a Whats New entry would not hurt.

Shall I give it a go here and mention those three things?

@chris-eibl
Copy link
MemberAuthor

@Fidget-Spinner : your tail call for Windows#130040 (comment) came without What's new, too. Shall I add an entry, too?

Are there more PRs for those kind of optimizations on Windows?

I'd like to work on the many warnings clang-cl emits, but IMHO that won't go into What's new. Regarding optimizations, I think that's it atm, we can amend later, anyway.

@Fidget-Spinner
Copy link
Member

@Fidget-Spinner : your tail call for Windows#130040 (comment) came without What's new, too. Shall I add an entry, too?

We don't need it, as there's already a whats new for tail call in general.

chris-eibl reacted with thumbs up emoji


* building with clang-cl on Windows now supports PGO (profile guided
optimization), uses ``-flto=thin`` and can be configured to use
computed gotos. (Contributed by Chris Eibl in
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

IMHO "computed gotos and/or tail calls" would be better here, but up to@Fidget-Spinner 's liking :)

@zooba
Copy link
Member

I think we want to be careful putting too much into What's New, since we still aren'ttechnically supporting clang-cl on Windows yet, we're really just unblocking it. No doubt if@chris-eibl sticks around it'll remain unblocked, but also, if Clang one day breaks down and MSVC is fine then we're still going to release.

A simple entry (which should already be there?) stating thatbuild.bat now has a clang-cl specific option (previously you needed to setPlatformToolset but that was the only difference) and perhaps calling out that this enables some clang-specific optimisations, referencingPCbuild\readme.txt for more info seems to hit the balance. Let's avoid using the word "support" in regards to our source code.

chris-eibl and Fidget-Spinner reacted with thumbs up emoji

@chris-eibl
Copy link
MemberAuthor

previously you needed to set PlatformToolset but that was the only difference

This is still true, we do not have a "clang" switch for build.bat, yet.

I am fine with entirely removing the whatsnew if that makes it easier :)

Copy link
Member

@zoobazooba left a comment

Choose a reason for hiding this comment

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

PCbuild changes look good, just suggesting some clarifications to the docs.

Comment on lines 1 to 2
Add optimizing flag ``WITH_COMPUTED_GOTOS`` to support such builds using
clang-cl on Windows. Patch by Chris Eibl.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Add optimizing flag ``WITH_COMPUTED_GOTOS`` tosupport suchbuildsusing
clang-cl on Windows. Patch by Chris Eibl.
Add optimizing flag ``WITH_COMPUTED_GOTOS`` toWindowsbuildsfor when
using a compiler that supports it (currentlyclang-cl). Patch by Chris Eibl.

with:c:expr:`Py_NO_LINK_LIB`. (Contributed by Jean-Christophe
Fillion-Robin in:gh:`82909`.)

* building with clang-cl on Windows now supports PGO (profile guided
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
*building withclang-cl on Windows nowsupports PGO (profile guided
* clang-clbuildson Windows nowwork with ``--pgo`` (profile guided

Fillion-Robin in:gh:`82909`.)

* building with clang-cl on Windows now supports PGO (profile guided
optimization), uses ``-flto=thin`` and can be configured to use
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
optimization),uses ``-flto=thin``and can be configured to use
optimization), and can be configured to use

Is using-flto=thin important to call out? It shouldn't change the ABI of the build output at all, and it's not configurable.

@zooba
Copy link
Member

This is still true, we do not have a "clang" switch for build.bat, yet.

(Seen after submitting my review.) Oh don't we? Okay, yeah, let's treat all clang-cl specific changes as undocumented then. The day it gets an option is when we'd start putting notes in theBuild section of NEWS, and give the option a brief mention in What's New.

chris-eibl reacted with thumbs up emoji

@zoobazooba merged commit468a7aa intopython:mainMar 17, 2025
39 checks passed
@chris-eiblchris-eibl deleted the param_cg branchMarch 18, 2025 05:25
colesbury pushed a commit to colesbury/cpython that referenced this pull requestMar 20, 2025
seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@zoobazoobazooba left review comments

@picnixzpicnixzpicnixz approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@chris-eibl@Fidget-Spinner@picnixz@zooba

[8]ページ先頭

©2009-2025 Movatter.jp