Skip to content

Commit 322ea9b

Browse files
Add fix for exe
1 parent d079df9 commit 322ea9b

File tree

2 files changed

+137
-129
lines changed

2 files changed

+137
-129
lines changed

.github/workflows/jit.yml

Lines changed: 129 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@ env:
3333
FORCE_COLOR: 1
3434

3535
jobs:
36-
interpreter:
37-
name: Interpreter (Debug)
38-
runs-on: ubuntu-24.04
39-
timeout-minutes: 90
40-
steps:
41-
- uses: actions/checkout@v4
42-
with:
43-
persist-credentials: false
44-
- name: Build tier two interpreter
45-
run: |
46-
./configure --enable-experimental-jit=interpreter --with-pydebug
47-
make all --jobs 4
48-
- name: Test tier two interpreter
49-
run: |
50-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
36+
# interpreter:
37+
# name: Interpreter (Debug)
38+
# runs-on: ubuntu-24.04
39+
# timeout-minutes: 90
40+
# steps:
41+
# - uses: actions/checkout@v4
42+
# with:
43+
# persist-credentials: false
44+
# - name: Build tier two interpreter
45+
# run: |
46+
# ./configure --enable-experimental-jit=interpreter --with-pydebug
47+
# make all --jobs 4
48+
# - name: Test tier two interpreter
49+
# run: |
50+
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
5151
jit:
5252
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
53-
needs: interpreter
53+
# needs: interpreter
5454
runs-on: ${{ matrix.runner }}
5555
timeout-minutes: 90
5656
strategy:
@@ -60,10 +60,10 @@ jobs:
6060
- i686-pc-windows-msvc/msvc
6161
- x86_64-pc-windows-msvc/msvc
6262
- aarch64-pc-windows-msvc/msvc
63-
- x86_64-apple-darwin/clang
64-
- aarch64-apple-darwin/clang
65-
- x86_64-unknown-linux-gnu/gcc
66-
- aarch64-unknown-linux-gnu/gcc
63+
# - x86_64-apple-darwin/clang
64+
# - aarch64-apple-darwin/clang
65+
# - x86_64-unknown-linux-gnu/gcc
66+
# - aarch64-unknown-linux-gnu/gcc
6767
debug:
6868
- true
6969
- false
@@ -79,18 +79,18 @@ jobs:
7979
- target: aarch64-pc-windows-msvc/msvc
8080
architecture: ARM64
8181
runner: windows-11-arm
82-
- target: x86_64-apple-darwin/clang
83-
architecture: x86_64
84-
runner: macos-15-intel
85-
- target: aarch64-apple-darwin/clang
86-
architecture: aarch64
87-
runner: macos-14
88-
- target: x86_64-unknown-linux-gnu/gcc
89-
architecture: x86_64
90-
runner: ubuntu-24.04
91-
- target: aarch64-unknown-linux-gnu/gcc
92-
architecture: aarch64
93-
runner: ubuntu-24.04-arm
82+
# - target: x86_64-apple-darwin/clang
83+
# architecture: x86_64
84+
# runner: macos-15-intel
85+
# - target: aarch64-apple-darwin/clang
86+
# architecture: aarch64
87+
# runner: macos-14
88+
# - target: x86_64-unknown-linux-gnu/gcc
89+
# architecture: x86_64
90+
# runner: ubuntu-24.04
91+
# - target: aarch64-unknown-linux-gnu/gcc
92+
# architecture: aarch64
93+
# runner: ubuntu-24.04-arm
9494
steps:
9595
- uses: actions/checkout@v4
9696
with:
@@ -106,104 +106,104 @@ jobs:
106106
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
107107
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
108108
109-
- name: macOS
110-
if: runner.os == 'macOS'
111-
run: |
112-
brew update
113-
brew install llvm@${{ matrix.llvm }}
114-
export SDKROOT="$(xcrun --show-sdk-path)"
115-
# Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
116-
# make sure we don't break downstream distributors (like uv):
117-
export CFLAGS_JIT='-Werror=unguarded-availability'
118-
export MACOSX_DEPLOYMENT_TARGET=10.15
119-
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
120-
make all --jobs 4
121-
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
109+
# - name: macOS
110+
# if: runner.os == 'macOS'
111+
# run: |
112+
# brew update
113+
# brew install llvm@${{ matrix.llvm }}
114+
# export SDKROOT="$(xcrun --show-sdk-path)"
115+
# # Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
116+
# # make sure we don't break downstream distributors (like uv):
117+
# export CFLAGS_JIT='-Werror=unguarded-availability'
118+
# export MACOSX_DEPLOYMENT_TARGET=10.15
119+
# ./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
120+
# make all --jobs 4
121+
# ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
122122

123-
- name: Linux
124-
if: runner.os == 'Linux'
125-
run: |
126-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
127-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
128-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
129-
make all --jobs 4
130-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
123+
# - name: Linux
124+
# if: runner.os == 'Linux'
125+
# run: |
126+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
127+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
128+
# ./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
129+
# make all --jobs 4
130+
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
131131

132-
jit-with-disabled-gil:
133-
name: Free-Threaded (Debug)
134-
needs: interpreter
135-
runs-on: ubuntu-24.04
136-
timeout-minutes: 90
137-
strategy:
138-
fail-fast: false
139-
matrix:
140-
llvm:
141-
- 21
142-
steps:
143-
- uses: actions/checkout@v4
144-
with:
145-
persist-credentials: false
146-
- uses: actions/setup-python@v5
147-
with:
148-
python-version: '3.11'
149-
- name: Build with JIT enabled and GIL disabled
150-
run: |
151-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
152-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
153-
./configure --enable-experimental-jit --with-pydebug --disable-gil
154-
make all --jobs 4
155-
- name: Run tests
156-
run: |
157-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
158-
continue-on-error: true
132+
# jit-with-disabled-gil:
133+
# name: Free-Threaded (Debug)
134+
# needs: interpreter
135+
# runs-on: ubuntu-24.04
136+
# timeout-minutes: 90
137+
# strategy:
138+
# fail-fast: false
139+
# matrix:
140+
# llvm:
141+
# - 21
142+
# steps:
143+
# - uses: actions/checkout@v4
144+
# with:
145+
# persist-credentials: false
146+
# - uses: actions/setup-python@v5
147+
# with:
148+
# python-version: '3.11'
149+
# - name: Build with JIT enabled and GIL disabled
150+
# run: |
151+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
152+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
153+
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
154+
# make all --jobs 4
155+
# - name: Run tests
156+
# run: |
157+
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
158+
# continue-on-error: true
159159

160-
no-opt-jit:
161-
name: JIT without optimizations (Debug)
162-
needs: interpreter
163-
runs-on: ubuntu-24.04
164-
timeout-minutes: 90
165-
strategy:
166-
fail-fast: false
167-
matrix:
168-
llvm:
169-
- 21
170-
steps:
171-
- uses: actions/checkout@v4
172-
with:
173-
persist-credentials: false
174-
- uses: actions/setup-python@v5
175-
with:
176-
python-version: '3.11'
177-
- name: Build with JIT
178-
run: |
179-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
180-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
181-
./configure --enable-experimental-jit --with-pydebug
182-
make all --jobs 4
183-
- name: Run tests without optimizations
184-
run: |
185-
PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
160+
# no-opt-jit:
161+
# name: JIT without optimizations (Debug)
162+
# needs: interpreter
163+
# runs-on: ubuntu-24.04
164+
# timeout-minutes: 90
165+
# strategy:
166+
# fail-fast: false
167+
# matrix:
168+
# llvm:
169+
# - 21
170+
# steps:
171+
# - uses: actions/checkout@v4
172+
# with:
173+
# persist-credentials: false
174+
# - uses: actions/setup-python@v5
175+
# with:
176+
# python-version: '3.11'
177+
# - name: Build with JIT
178+
# run: |
179+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
180+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
181+
# ./configure --enable-experimental-jit --with-pydebug
182+
# make all --jobs 4
183+
# - name: Run tests without optimizations
184+
# run: |
185+
# PYTHON_UOPS_OPTIMIZE=0 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
186186

187-
tail-call-jit:
188-
name: JIT with tail calling interpreter
189-
needs: interpreter
190-
runs-on: ubuntu-24.04
191-
timeout-minutes: 90
192-
strategy:
193-
fail-fast: false
194-
matrix:
195-
llvm:
196-
- 21
197-
steps:
198-
- uses: actions/checkout@v4
199-
with:
200-
persist-credentials: false
201-
- uses: actions/setup-python@v5
202-
with:
203-
python-version: '3.11'
204-
- name: Build with JIT and tailcall
205-
run: |
206-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
207-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
208-
CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
209-
make all --jobs 4
187+
# tail-call-jit:
188+
# name: JIT with tail calling interpreter
189+
# needs: interpreter
190+
# runs-on: ubuntu-24.04
191+
# timeout-minutes: 90
192+
# strategy:
193+
# fail-fast: false
194+
# matrix:
195+
# llvm:
196+
# - 21
197+
# steps:
198+
# - uses: actions/checkout@v4
199+
# with:
200+
# persist-credentials: false
201+
# - uses: actions/setup-python@v5
202+
# with:
203+
# python-version: '3.11'
204+
# - name: Build with JIT and tailcall
205+
# run: |
206+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
207+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
208+
# CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
209+
# make all --jobs 4

Tools/jit/_llvm.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ async def _find_tool(tool: str, llvm_version: str, *, echo: bool = False) -> str
8989
externals = os.environ.get("EXTERNALS_DIR", _targets.EXTERNALS)
9090
path = os.path.join(externals, _EXTERNALS_LLVM_TAG, "bin", tool)
9191
print(f"DEBUG: Trying PCbuild externals: {path} (exists: {os.path.exists(path)})")
92+
# On Windows, executables need .exe extension
93+
if os.name == "nt" and not path.endswith(".exe"):
94+
path_with_exe = path + ".exe"
95+
print(
96+
f"DEBUG: Also trying with .exe: {path_with_exe} (exists: {os.path.exists(path_with_exe)})"
97+
)
98+
if os.path.exists(path_with_exe):
99+
path = path_with_exe
92100
if await _check_tool_version(path, llvm_version, echo=echo):
93101
print(f"DEBUG: Found at: {path}")
94102
return path

0 commit comments

Comments
 (0)