Skip to content

Commit 940e41e

Browse files
committed
bump python version to get emscripten 4.0.9 (which dawn needs for emsdk/upstream/emscripten/tools/gen_struct_info.py)
1 parent f7755f2 commit 940e41e

File tree

6 files changed

+29
-36
lines changed

6 files changed

+29
-36
lines changed

.github/actions/setup_base/action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ inputs:
3131
python-version:
3232
required: false
3333
description: ''
34-
default: '3.12'
34+
default: '3.13'
35+
emscripten-version:
36+
required: false
37+
description: ''
38+
default: ''
3539

3640
outputs:
3741
cache-dir:
@@ -244,8 +248,12 @@ runs:
244248
shell: bash
245249
run: |
246250
247-
pip install pyodide-build>=0.28.0
248-
echo "EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)" >> $GITHUB_ENV
251+
pip install pyodide-build==0.30.9
252+
if [[ "${{ inputs.emscripten-version }}" == "" ]]; then
253+
echo "EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)" >> $GITHUB_ENV
254+
else
255+
echo "EMSCRIPTEN_VERSION=${{ inputs.emscripten-version }}" >> $GITHUB_ENV
256+
fi
249257
250258
- name: Setup Emscripten
251259
if: inputs.target-arch == 'wasm32'

.github/workflows/build_mlir_python_bindings_wheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
run: |
125125
126126
if [[ "${{ matrix.target-arch }}" == "wasm32" ]]; then
127-
pip download mlir-wheel --plat pyodide_2024_0_wasm32 --no-deps --python-version 3.12 -f https://llvm.github.io/eudsl
127+
pip download mlir-wheel --plat pyodide_2025_0_wasm32 --no-deps --python-version 3.13 -f https://llvm.github.io/eudsl
128128
else
129129
pip download mlir-wheel -f https://llvm.github.io/eudsl
130130
fi

.github/workflows/deploy_pip_page.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ jobs:
4949
- name: Setup Python
5050
uses: actions/setup-python@v5
5151
with:
52-
python-version: '3.12'
52+
python-version: '3.13'
5353

5454
- name: Fetch latest WASM wheel
5555
run: |
56-
pip download mlir-python-bindings --plat pyodide_2024_0_wasm32 --no-deps --python-version 3.12 -f https://llvm.github.io/eudsl
56+
pip download mlir-python-bindings --plat pyodide_2025_0_wasm32 --no-deps --python-version 3.13 -f https://llvm.github.io/eudsl
5757
echo "MLIR_PYTHON_WHEEL_NAME=$(ls mlir_python_bindings*)" >> $GITHUB_ENV
5858
pip wheel eudsl-python-extras -f https://llvm.github.io/eudsl --no-deps -w .
5959
echo "EUDSL_PYTHON_EXTRAS_WHEEL_NAME=$(ls eudsl_python_extras*)" >> $GITHUB_ENV

scripts/llvm_wasm/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ FROM ubuntu
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
RUN apt-get update && apt-get -y install python-is-python3 cmake ninja-build python3.12-venv python3-pip vim git unzip
5+
RUN apt-get update && apt-get -y install python-is-python3 cmake ninja-build python3-pip vim git unzip software-properties-common
6+
7+
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt update && apt -y install python3.13 python3.13-venv
8+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.13 99
69

710
RUN python -m venv venv
8-
RUN /venv/bin/python -m pip install pip-tools pyodide-build
11+
RUN /venv/bin/python -m pip install pip-tools pyodide-build==0.30.9
912
RUN echo 'source "/venv/bin/activate"' >> $HOME/.bashrc
1013

1114
RUN git clone https://github.com/emscripten-core/emsdk.git
1215
# EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)
1316
RUN cd emsdk && \
14-
./emsdk install 3.1.58 ccache-git-emscripten-64bit && \
15-
./emsdk activate 3.1.58 ccache-git-emscripten-64bit && \
17+
./emsdk install 4.0.9 ccache-git-emscripten-64bit && \
18+
./emsdk activate 4.0.9 ccache-git-emscripten-64bit && \
1619
cd ..
1720
RUN echo 'source "/emsdk/emsdk_env.sh"' >> $HOME/.bashrc

scripts/llvm_wasm/llvm_wasm_cache.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set(LLVM_DEFAULT_TARGET_TRIPLE "wasm32-unknown-emscripten" CACHE STRING "")
1313
set(LLVM_HOST_TRIPLE "wasm32-unknown-emscripten" CACHE STRING "")
1414
set(LLVM_BUILD_STATIC ON CACHE BOOL "")
1515
set(LLVM_ENABLE_RTTI ON CACHE BOOL "")
16-
set(LLVM_ENABLE_EH ON CACHE BOOL "")
16+
set(LLVM_ENABLE_PIC ON CACHE BOOL "")
1717

1818
set(MLIR_ENABLE_BINDINGS_PYTHON ON CACHE BOOL "")
1919
set(MLIR_ENABLE_EXECUTION_ENGINE ON CACHE BOOL "")
@@ -27,7 +27,6 @@ set(LLVM_ENABLE_LIBEDIT OFF CACHE BOOL "")
2727
set(LLVM_ENABLE_LIBPFM OFF CACHE BOOL "")
2828
set(LLVM_ENABLE_LIBXML2 OFF CACHE BOOL "")
2929
set(LLVM_ENABLE_OCAMLDOC OFF CACHE BOOL "")
30-
set(LLVM_ENABLE_PIC OFF CACHE BOOL "")
3130
set(LLVM_ENABLE_THREADS OFF CACHE BOOL "")
3231
set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "")
3332
set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")

scripts/llvm_wasm/pyproject.toml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,34 +45,17 @@ cmake.args = ["-C", "llvm_wasm_cache.cmake"]
4545
CMAKE_BUILD_TYPE = { env = "CMAKE_BUILD_TYPE", default = "Release" }
4646
CMAKE_C_COMPILER_LAUNCHER = { env = "CMAKE_C_COMPILER_LAUNCHER", default = "" }
4747
CMAKE_CXX_COMPILER_LAUNCHER = { env = "CMAKE_CXX_COMPILER_LAUNCHER", default = "" }
48-
CMAKE_CXX_FLAGS = "-sNO_DISABLE_EXCEPTION_CATCHING"
49-
CMAKE_EXE_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT"
50-
CMAKE_SHARED_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT"
51-
CMAKE_MODULE_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT"
48+
#CMAKE_CXX_FLAGS = "-sNO_DISABLE_EXCEPTION_CATCHING"
49+
#CMAKE_EXE_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT"
50+
#CMAKE_SHARED_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT"
51+
#CMAKE_MODULE_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sNO_DISABLE_EXCEPTION_CATCHING -sWASM_BIGINT"
52+
CMAKE_EXE_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT"
53+
CMAKE_SHARED_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT"
54+
CMAKE_MODULE_LINKER_FLAGS = "-sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT"
5255
CMAKE_VERBOSE_MAKEFILE = "ON"
5356

54-
LLVM_ENABLE_EH = "ON"
55-
LLVM_ENABLE_PROJECTS = "mlir;lld"
56-
LLVM_ENABLE_RTTI = "ON"
57-
LLVM_ENABLE_THREADS = "OFF"
58-
# requires threads
59-
LLVM_INCLUDE_BENCHMARKS = "OFF"
60-
LLVM_INCLUDE_TESTS = "OFF"
61-
62-
# for ExecutionEngine
63-
LLVM_ENABLE_PIC = "ON"
64-
LLVM_TARGET_ARCH = "wasm32"
65-
LLVM_HOST_TRIPLE = "wasm32-unknown-emscripten"
66-
LLVM_TARGETS_TO_BUILD = "WebAssembly"
67-
LLVM_DEFAULT_TARGET_TRIPLE = "wasm32-unknown-emscripten"
68-
6957
# so that NATIVE doesn't try to get built
7058
LLVM_NATIVE_TOOL_DIR = { env = "LLVM_NATIVE_TOOL_DIR", default = "" }
7159
LLVM_TABLEGEN = { env = "LLVM_TABLEGEN", default = "" }
7260
MLIR_LINALG_ODS_YAML_GEN = { env = "MLIR_LINALG_ODS_YAML_GEN", default = "" }
7361
MLIR_TABLEGEN = { env = "MLIR_TABLEGEN", default = "" }
74-
75-
MLIR_BINDINGS_PYTHON_INSTALL_PREFIX = "mlir"
76-
MLIR_ENABLE_BINDINGS_PYTHON = "ON"
77-
MLIR_ENABLE_EXECUTION_ENGINE = "ON"
78-
MLIR_ENABLE_SPIRV_CPU_RUNNER = "ON"

0 commit comments

Comments
 (0)