mirror of
https://github.com/Z3Prover/z3
synced 2026-06-22 16:40:29 +00:00
Fix Pyodide workflow exception flag mismatch (#9909)
The Pyodide `build` job was passing legacy Emscripten exception flags
that conflict with the wasm-exception ABI now used by the Python
packaging configuration. This caused the wheel build to fail before
compilation completed.
- **Align Pyodide workflow flags**
- Remove per-workflow `CFLAGS` / `CXXFLAGS` / `LDFLAGS` overrides from
the Pyodide build step.
- Let the build inherit the canonical wasm-exception / longjmp / bigint
flags from `src/api/python/pyproject.toml`.
- **Apply the fix consistently**
- Update the standalone Pyodide workflow.
- Update the matching Pyodide build steps in `nightly.yml` and
`release.yml` to avoid the same regression in scheduled and release
builds.
- **Why this fixes the failure**
- The broken path mixed JS-exception and wasm-exception settings:
```yaml
CFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0 -g2"
CXXFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0"
```
- The updated workflows now invoke:
```yaml
~/env/bin/pyodide build --exports whole_archive
```
and rely on the packaging config’s wasm-exception settings instead.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
parent
07f1979eba
commit
3c2526a2c3
3 changed files with 12 additions and 16 deletions
9
.github/workflows/nightly.yml
vendored
9
.github/workflows/nightly.yml
vendored
|
|
@ -512,11 +512,10 @@ jobs:
|
|||
run: |
|
||||
source ~/emsdk/emsdk_env.sh
|
||||
cd src/api/python
|
||||
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS}" ~/env/bin/pyodide build --exports whole_archive
|
||||
env:
|
||||
CFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0 -g2"
|
||||
LDFLAGS: "-fexceptions -s WASM_BIGINT"
|
||||
CXXFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0"
|
||||
# Exception/longjmp/bigint flags are declared in pyproject.toml and
|
||||
# combined with Pyodide's -fwasm-exceptions defaults. Passing the
|
||||
# legacy JS-EH -fexceptions flags here conflicts with the wasm-EH ABI.
|
||||
~/env/bin/pyodide build --exports whole_archive
|
||||
|
||||
- name: Setup env-pyodide
|
||||
run: |
|
||||
|
|
|
|||
10
.github/workflows/pyodide.yml
vendored
10
.github/workflows/pyodide.yml
vendored
|
|
@ -42,11 +42,10 @@ jobs:
|
|||
run: |
|
||||
source ~/emsdk/emsdk_env.sh
|
||||
cd src/api/python
|
||||
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CXXFLAG="${CXXFLAGS}" ~/env/bin/pyodide build --exports whole_archive
|
||||
env:
|
||||
CFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0 -g2"
|
||||
LDFLAGS: "-fexceptions -s WASM_BIGINT"
|
||||
CXXFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0"
|
||||
# Exception/longjmp/bigint flags are declared in pyproject.toml and
|
||||
# combined with Pyodide's -fwasm-exceptions defaults. Passing the
|
||||
# legacy JS-EH -fexceptions flags here conflicts with the wasm-EH ABI.
|
||||
~/env/bin/pyodide build --exports whole_archive
|
||||
|
||||
- name: Setup env-pyodide
|
||||
run: |
|
||||
|
|
@ -65,4 +64,3 @@ jobs:
|
|||
name: pyodide-wheel
|
||||
path: src/api/python/dist/*.whl
|
||||
retention-days: 1
|
||||
|
||||
|
|
|
|||
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
|
|
@ -522,11 +522,10 @@ jobs:
|
|||
run: |
|
||||
source ~/emsdk/emsdk_env.sh
|
||||
cd src/api/python
|
||||
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CXXFLAGS="${CXXFLAGS}" ~/env/bin/pyodide build --exports whole_archive
|
||||
env:
|
||||
CFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0 -g2"
|
||||
LDFLAGS: "-fexceptions -s WASM_BIGINT"
|
||||
CXXFLAGS: "-fexceptions -s DISABLE_EXCEPTION_CATCHING=0"
|
||||
# Exception/longjmp/bigint flags are declared in pyproject.toml and
|
||||
# combined with Pyodide's -fwasm-exceptions defaults. Passing the
|
||||
# legacy JS-EH -fexceptions flags here conflicts with the wasm-EH ABI.
|
||||
~/env/bin/pyodide build --exports whole_archive
|
||||
|
||||
- name: Setup env-pyodide
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue