-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
bpo-40280: Add Tools/wasm with helpers for cross building (GH-29984) #29984
Conversation
3305617
to
877bb04
Compare
877bb04
to
f65a480
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will definitely make experimenting with Emscripten based CPython a lot easier!
I have a few suggestions/comments but overall this looks good.
The binary size looks really great! Though with the number of things disabled, it will probably grow over time... |
a3797c0
to
6a103d9
Compare
With
I'm able to shrink the core to about 6 MB
The
The largest 25 files are:
@brettcannon now is a good time to discuss what modules belong in a minimum stdlib. |
Wow that's a great reduction in size! I played with thin lto and for some reason it greatly increases the binary size (to 21MB!). I guess inlining makes the build a lot bigger. One other idea I had which gives small gains in binary size is compiling with -Os, which seems to not make much of a difference vs -Oz. |
Actually it is less. I think I introduced a regression in GH-30001. makesetup is dropping too many modules from the final binary. |
59d8c8e
to
218aef5
Compare
218aef5
to
f933b91
Compare
## wasm32-emscripten build | ||
|
||
Cross compiling to wasm32-emscripten platform needs [Emscripten](https://emscripten.org/) | ||
tool chain and a build Python interpreter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tool chain and a build Python interpreter. | |
tool chain and a built Python interpreter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build
here is I believe a reference to the autotools/configure --build
argument. (Same for line 11 below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. In lack of a better term I introduced the term "build Python"/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My brain just keeps reading "build" as a verb instead of an adjective. 😄
Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
CPython upstream now has a config.site for WASM `and make python.html`. See: python/cpython#29984 Signed-off-by: Christian Heimes <[email protected]>
https://bugs.python.org/issue40280