-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mypyc] Add support for building mypyc code on WASM (#13446)
### Description This PR tweaks two things about how mypyc generates and builds C code to better support WebAssembly. First, we search `sysconfig` for the size of `size_t`, which works much better for cross-compiling. Second, newer versions of clang have `-Wno-unused-but-set-variable` and so it is added to the default list of arguments (this should probably land regardless the decision on merging this PR). ## Test Plan This PR depends on #13445. To test this PR, you can do the following: *assuming mypy checkout with both PRs applied, must be on Python 3.10(!)* ``` $ pip install pyodide-build $ pyodide build --exports pyinit backend-args --global-option=--use-mypyc ``` Note: you will get a warning about using `--global-option`, you can ignore it for now. I'm trying to find out why `--build-option` isn't working... Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
- Loading branch information
1 parent
7c14fee
commit 11be378
Showing
3 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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