From 701aa8df68e62b3189c8aa1139a66490c8fe814a Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 01:54:24 +0800 Subject: [PATCH 01/16] Fix double redeclaration on MSVC+clang-cl --- Include/internal/pycore_debug_offsets.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index 124b104e4ba8ae..6bef4161b1c191 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -17,13 +17,21 @@ extern "C" { // Macros to burn global values in custom sections so out-of-process // profilers can locate them easily. -#define GENERATE_DEBUG_SECTION(name, declaration) \ - _GENERATE_DEBUG_SECTION_WINDOWS(name) \ - _GENERATE_DEBUG_SECTION_APPLE(name) \ - declaration \ - _GENERATE_DEBUG_SECTION_LINUX(name) -#if defined(MS_WINDOWS) && !defined(__clang__) +// MSVC+Clang has a bug where it declares it twice. +#if defined(MS_WINDOWS) && defined(__clang__) +# define GENERATE_DEBUG_SECTION(name, declaration) \ + _GENERATE_DEBUG_SECTION_WINDOWS(name) +#else +// Everything else +# define GENERATE_DEBUG_SECTION(name, declaration) \ + _GENERATE_DEBUG_SECTION_WINDOWS(name) \ + _GENERATE_DEBUG_SECTION_APPLE(name) \ + declaration \ + _GENERATE_DEBUG_SECTION_LINUX(name) +#endif + +#if defined(MS_WINDOWS) #define _GENERATE_DEBUG_SECTION_WINDOWS(name) \ _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \ __declspec(allocate(Py_STRINGIFY(name))) From e4491481df815a839ba203e1111006e3774508a8 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 01:56:16 +0800 Subject: [PATCH 02/16] trigger CI --- .github/workflows/tail-call.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 572ff45e51ef00..ae077329566e44 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -1,3 +1,4 @@ +# Beep boop trigger CI name: Tail calling interpreter on: pull_request: From 5eea591869645da235929897d97c628c3b3c85de Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:05:46 +0800 Subject: [PATCH 03/16] Upgrade to LLVM 20 --- .github/workflows/tail-call.yml | 11 +++++------ Include/internal/pycore_debug_offsets.h | 18 +++++------------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index ae077329566e44..092394472e72eb 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -1,4 +1,3 @@ -# Beep boop trigger CI name: Tail calling interpreter on: pull_request: @@ -46,7 +45,7 @@ jobs: - aarch64-unknown-linux-gnu/gcc - free-threading llvm: - - 19 + - 20 include: # - target: i686-pc-windows-msvc/msvc # architecture: Win32 @@ -84,9 +83,9 @@ jobs: if: runner.os == 'Windows' && matrix.architecture != 'ARM64' shell: cmd run: | - choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.5 + choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0 set PlatformToolset=clangcl - set LLVMToolsVersion=${{ matrix.llvm }}.1.5 + set LLVMToolsVersion=${{ matrix.llvm }}.1.0 set LLVMInstallDir=C:\Program Files\LLVM call ./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }} call ./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3 @@ -96,9 +95,9 @@ jobs: if: runner.os == 'Windows' && matrix.architecture == 'ARM64' shell: cmd run: | - choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.5 + choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0 set PlatformToolset=clangcl - set LLVMToolsVersion=${{ matrix.llvm }}.1.5 + set LLVMToolsVersion=${{ matrix.llvm }}.1.0 set LLVMInstallDir=C:\Program Files\LLVM ./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }} diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index 6bef4161b1c191..200194c2ab1ed5 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -17,19 +17,11 @@ extern "C" { // Macros to burn global values in custom sections so out-of-process // profilers can locate them easily. - -// MSVC+Clang has a bug where it declares it twice. -#if defined(MS_WINDOWS) && defined(__clang__) -# define GENERATE_DEBUG_SECTION(name, declaration) \ - _GENERATE_DEBUG_SECTION_WINDOWS(name) -#else -// Everything else -# define GENERATE_DEBUG_SECTION(name, declaration) \ - _GENERATE_DEBUG_SECTION_WINDOWS(name) \ - _GENERATE_DEBUG_SECTION_APPLE(name) \ - declaration \ - _GENERATE_DEBUG_SECTION_LINUX(name) -#endif +#define GENERATE_DEBUG_SECTION(name, declaration) \ + _GENERATE_DEBUG_SECTION_WINDOWS(name) \ + _GENERATE_DEBUG_SECTION_APPLE(name) \ + declaration \ + _GENERATE_DEBUG_SECTION_LINUX(name) #if defined(MS_WINDOWS) #define _GENERATE_DEBUG_SECTION_WINDOWS(name) \ From fcb45ef74642708945c0f164084a385aabaabc11 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:17:34 +0800 Subject: [PATCH 04/16] Fix --- .github/workflows/tail-call.yml | 12 +++++++----- Include/internal/pycore_debug_offsets.h | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 092394472e72eb..9bf6b4e138a91b 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -105,6 +105,8 @@ jobs: # This is a bug in the macOS runner image where the pre-installed Python is installed in the same # directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes # the symlink to the pre-installed Python so that the Homebrew Python is used instead. + # Note: when a new LLVM is released, the homebrew installation directory changes, so the builds will fail. + # We either need to upgrade LLVM or change the directory being pointed to. - name: Native macOS (release) if: runner.os == 'macOS' run: | @@ -112,9 +114,9 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" - export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH" - export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH" - CC=clang-19 ./configure --with-tail-call-interp + export PATH="/opt/homebrew/Cellar/llvm/{{ matrix.llvm }}.1.0:$PATH" + export PATH="/usr/local/opt/llvm/bin:$PATH" + CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 @@ -123,7 +125,7 @@ jobs: run: | sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" - CC=clang-19 ./configure --with-tail-call-interp --with-pydebug + CC=clang-20 ./configure --with-tail-call-interp --with-pydebug make all --jobs 4 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 @@ -132,7 +134,7 @@ jobs: run: | sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }} export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH" - CC=clang-19 ./configure --with-tail-call-interp --disable-gil + CC=clang-20 ./configure --with-tail-call-interp --disable-gil make all --jobs 4 ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index 200194c2ab1ed5..d9d0e3c15c3c64 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -23,10 +23,12 @@ extern "C" { declaration \ _GENERATE_DEBUG_SECTION_LINUX(name) -#if defined(MS_WINDOWS) +#if defined(MS_WINDOWS) && !defined(__clang__) #define _GENERATE_DEBUG_SECTION_WINDOWS(name) \ _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \ __declspec(allocate(Py_STRINGIFY(name))) +#elif defined(MS_WINDOWS) && defined(__clang__) + _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) #else #define _GENERATE_DEBUG_SECTION_WINDOWS(name) #endif From ce1a4aef904a1464f96fe9c3b2a574e13397e0e7 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:18:46 +0800 Subject: [PATCH 05/16] fix macos --- .github/workflows/tail-call.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 9bf6b4e138a91b..6497ee2d63953f 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -114,7 +114,7 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" - export PATH="/opt/homebrew/Cellar/llvm/{{ matrix.llvm }}.1.0:$PATH" + export PATH="/opt/homebrew/Cellar/llvm/{{ matrix.llvm }}.1.1:$PATH" export PATH="/usr/local/opt/llvm/bin:$PATH" CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 From d2002cd4d119f55f347590de602a4771bef27dc5 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:26:26 +0800 Subject: [PATCH 06/16] fix macOS --- .github/workflows/tail-call.yml | 3 +-- Include/internal/pycore_debug_offsets.h | 2 -- Python/pylifecycle.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 6497ee2d63953f..7d46bb6b361ec8 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -114,8 +114,7 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" - export PATH="/opt/homebrew/Cellar/llvm/{{ matrix.llvm }}.1.1:$PATH" - export PATH="/usr/local/opt/llvm/bin:$PATH" + export PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index d9d0e3c15c3c64..124b104e4ba8ae 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -27,8 +27,6 @@ extern "C" { #define _GENERATE_DEBUG_SECTION_WINDOWS(name) \ _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \ __declspec(allocate(Py_STRINGIFY(name))) -#elif defined(MS_WINDOWS) && defined(__clang__) - _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) #else #define _GENERATE_DEBUG_SECTION_WINDOWS(name) #endif diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 934614e73b56f9..709a653841e669 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -109,7 +109,7 @@ static void call_ll_exitfuncs(_PyRuntimeState *runtime); _Py_COMP_DIAG_PUSH _Py_COMP_DIAG_IGNORE_DEPR_DECLS -GENERATE_DEBUG_SECTION(PyRuntime, _PyRuntimeState _PyRuntime) +GENERATE_DEBUG_SECTION(PyRuntime, extern _PyRuntimeState _PyRuntime) = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); _Py_COMP_DIAG_POP From c8afa07f9f739afcf5a328e3075a55a9c2152480 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:30:26 +0800 Subject: [PATCH 07/16] fix macOS for real this time --- .github/workflows/tail-call.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 7d46bb6b361ec8..8ac2671e06b23f 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -114,7 +114,7 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" - export PATH="/opt/homebrew/opt/llvm/bin:$PATH" + export PATH="/usr/local/opt/llvm/bin:$PATH" CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 From 728eb686904fee07ba8083e7049018202209ba2d Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:33:02 +0800 Subject: [PATCH 08/16] maybe fix macOS? --- .github/workflows/tail-call.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 8ac2671e06b23f..4636372e26c41b 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -115,6 +115,7 @@ jobs: brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" export PATH="/usr/local/opt/llvm/bin:$PATH" + export PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 From bc1d9279ffa1cd938adfa6e61c27b8b5637769ac Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:42:03 +0800 Subject: [PATCH 09/16] Convince clang to behave like on Linux --- Include/internal/pycore_debug_offsets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index 124b104e4ba8ae..fc126246767657 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -39,7 +39,7 @@ extern "C" { #define _GENERATE_DEBUG_SECTION_APPLE(name) #endif -#if defined(__linux__) && (defined(__GNUC__) || defined(__clang__)) +#if (defined(__linux__) && (defined(__GNUC__) || defined(__clang__))) || (defined(MS_WINDOWS) && defined(__clang__)) #define _GENERATE_DEBUG_SECTION_LINUX(name) \ __attribute__((section("." Py_STRINGIFY(name)))) \ __attribute__((used)) From a468604b2e0c774c856fc30abef3d74f73b7549c Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 02:42:25 +0800 Subject: [PATCH 10/16] remove useless extern --- Python/pylifecycle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 709a653841e669..934614e73b56f9 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -109,7 +109,7 @@ static void call_ll_exitfuncs(_PyRuntimeState *runtime); _Py_COMP_DIAG_PUSH _Py_COMP_DIAG_IGNORE_DEPR_DECLS -GENERATE_DEBUG_SECTION(PyRuntime, extern _PyRuntimeState _PyRuntime) +GENERATE_DEBUG_SECTION(PyRuntime, _PyRuntimeState _PyRuntime) = _PyRuntimeState_INIT(_PyRuntime, _Py_Debug_Cookie); _Py_COMP_DIAG_POP From 07cafa9b5d870494dc585401ae530dbb1163ccad Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 03:05:13 +0800 Subject: [PATCH 11/16] Update remote_debugging.c --- Python/remote_debugging.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Python/remote_debugging.c b/Python/remote_debugging.c index 9b2297b5627aa3..f53ea439194e70 100644 --- a/Python/remote_debugging.c +++ b/Python/remote_debugging.c @@ -548,6 +548,11 @@ get_py_runtime(proc_handle_t* handle) #ifdef MS_WINDOWS // On Windows, search for 'python' in executable or DLL +#ifdef ___clang__ + const char* secname = "_PyRuntime"; +#else + const char* secname = "PyRuntime"; +#endif address = search_windows_map_for_section(handle, "PyRuntime", L"python"); if (address == 0) { // Error out: 'python' substring covers both executable and DLL From bd00b7859591a1b87abd826669a13c9876dc7eb3 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 03:08:35 +0800 Subject: [PATCH 12/16] Update remote_debugging.c --- Python/remote_debugging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/remote_debugging.c b/Python/remote_debugging.c index f53ea439194e70..9eb38caa06e758 100644 --- a/Python/remote_debugging.c +++ b/Python/remote_debugging.c @@ -548,7 +548,7 @@ get_py_runtime(proc_handle_t* handle) #ifdef MS_WINDOWS // On Windows, search for 'python' in executable or DLL -#ifdef ___clang__ +#ifdef __clang__ const char* secname = "_PyRuntime"; #else const char* secname = "PyRuntime"; From 04d34df053c5ebe19b887364d31c124de17756b9 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 5 Apr 2025 03:16:33 +0800 Subject: [PATCH 13/16] Update remote_debugging.c --- Python/remote_debugging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/remote_debugging.c b/Python/remote_debugging.c index 9eb38caa06e758..244f6198f99c70 100644 --- a/Python/remote_debugging.c +++ b/Python/remote_debugging.c @@ -553,7 +553,7 @@ get_py_runtime(proc_handle_t* handle) #else const char* secname = "PyRuntime"; #endif - address = search_windows_map_for_section(handle, "PyRuntime", L"python"); + address = search_windows_map_for_section(handle, secname, L"python"); if (address == 0) { // Error out: 'python' substring covers both executable and DLL PyErr_SetString(PyExc_RuntimeError, "Failed to find the PyRuntime section in the process."); From 5de6b43fadde9da6c7fd00d976d9c2775366b9fb Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sun, 6 Apr 2025 00:03:39 +0800 Subject: [PATCH 14/16] revert debug offset changes --- Include/internal/pycore_debug_offsets.h | 2 +- Python/remote_debugging.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index fc126246767657..124b104e4ba8ae 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -39,7 +39,7 @@ extern "C" { #define _GENERATE_DEBUG_SECTION_APPLE(name) #endif -#if (defined(__linux__) && (defined(__GNUC__) || defined(__clang__))) || (defined(MS_WINDOWS) && defined(__clang__)) +#if defined(__linux__) && (defined(__GNUC__) || defined(__clang__)) #define _GENERATE_DEBUG_SECTION_LINUX(name) \ __attribute__((section("." Py_STRINGIFY(name)))) \ __attribute__((used)) diff --git a/Python/remote_debugging.c b/Python/remote_debugging.c index 244f6198f99c70..9b2297b5627aa3 100644 --- a/Python/remote_debugging.c +++ b/Python/remote_debugging.c @@ -548,12 +548,7 @@ get_py_runtime(proc_handle_t* handle) #ifdef MS_WINDOWS // On Windows, search for 'python' in executable or DLL -#ifdef __clang__ - const char* secname = "_PyRuntime"; -#else - const char* secname = "PyRuntime"; -#endif - address = search_windows_map_for_section(handle, secname, L"python"); + address = search_windows_map_for_section(handle, "PyRuntime", L"python"); if (address == 0) { // Error out: 'python' substring covers both executable and DLL PyErr_SetString(PyExc_RuntimeError, "Failed to find the PyRuntime section in the process."); From e4ff0e0576478d31dbcd26670c00029aa2932dac Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sun, 6 Apr 2025 00:05:13 +0800 Subject: [PATCH 15/16] try eval brew shellenv --- .github/workflows/tail-call.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 4636372e26c41b..0596c6c1812fd4 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -114,8 +114,7 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" - export PATH="/usr/local/opt/llvm/bin:$PATH" - export PATH="/opt/homebrew/opt/llvm/bin:$PATH" + eval "$(brew shellenv)" CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 From b9c97f6558cc8701e4ed291823be0e24fe08bf34 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sun, 6 Apr 2025 00:10:48 +0800 Subject: [PATCH 16/16] revert eval --- .github/workflows/tail-call.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 0596c6c1812fd4..4636372e26c41b 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -114,7 +114,8 @@ jobs: find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" - eval "$(brew shellenv)" + export PATH="/usr/local/opt/llvm/bin:$PATH" + export PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=clang-20 ./configure --with-tail-call-interp make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3