Skip to content

Commit fcb45ef

Browse files
Fix
1 parent 5eea591 commit fcb45ef

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/tail-call.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,18 @@ jobs:
105105
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
106106
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
107107
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
108+
# Note: when a new LLVM is released, the homebrew installation directory changes, so the builds will fail.
109+
# We either need to upgrade LLVM or change the directory being pointed to.
108110
- name: Native macOS (release)
109111
if: runner.os == 'macOS'
110112
run: |
111113
brew update
112114
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
113115
brew install llvm@${{ matrix.llvm }}
114116
export SDKROOT="$(xcrun --show-sdk-path)"
115-
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
116-
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
117-
CC=clang-19 ./configure --with-tail-call-interp
117+
export PATH="/opt/homebrew/Cellar/llvm/{{ matrix.llvm }}.1.0:$PATH"
118+
export PATH="/usr/local/opt/llvm/bin:$PATH"
119+
CC=clang-20 ./configure --with-tail-call-interp
118120
make all --jobs 4
119121
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
120122
@@ -123,7 +125,7 @@ jobs:
123125
run: |
124126
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
125127
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
126-
CC=clang-19 ./configure --with-tail-call-interp --with-pydebug
128+
CC=clang-20 ./configure --with-tail-call-interp --with-pydebug
127129
make all --jobs 4
128130
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
129131
@@ -132,7 +134,7 @@ jobs:
132134
run: |
133135
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
134136
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
135-
CC=clang-19 ./configure --with-tail-call-interp --disable-gil
137+
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
136138
make all --jobs 4
137139
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
138140

Include/internal/pycore_debug_offsets.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ extern "C" {
2323
declaration \
2424
_GENERATE_DEBUG_SECTION_LINUX(name)
2525

26-
#if defined(MS_WINDOWS)
26+
#if defined(MS_WINDOWS) && !defined(__clang__)
2727
#define _GENERATE_DEBUG_SECTION_WINDOWS(name) \
2828
_Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \
2929
__declspec(allocate(Py_STRINGIFY(name)))
30+
#elif defined(MS_WINDOWS) && defined(__clang__)
31+
_Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write)))
3032
#else
3133
#define _GENERATE_DEBUG_SECTION_WINDOWS(name)
3234
#endif

0 commit comments

Comments
 (0)