Skip to content

Commit 60534eb

Browse files
committed
Separate clang from tailcall
1 parent 7777c18 commit 60534eb

File tree

4 files changed

+14
-32
lines changed

4 files changed

+14
-32
lines changed

bench_runner/flags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Flag:
1717
Flag("tier2", "PYTHON_UOPS", "tier 2 interpreter", "T2"),
1818
Flag("jit", "JIT", "JIT", "JIT"),
1919
Flag("nogil", "NOGIL", "free threading", "NOGIL"),
20-
Flag("clang", "CLANG", "build with latest clang and tailcall", "CLANG"),
20+
Flag("tailcall", "TAILCALL", "tail-calling interpreter", "TAILCALL"),
2121
]
2222

2323

bench_runner/scripts/workflow.py

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,6 @@ def compile_unix(cpython: PathLike, flags: list[str], pgo: bool, pystats: bool)
135135
cfg = config.get_config_for_current_runner()
136136

137137
env = os.environ.copy()
138-
if "CLANG" in flags:
139-
match util.get_simple_platform():
140-
case "linux":
141-
env["CC"] = util.safe_which("clang-19")
142-
env["LLVM_AR"] = util.safe_which("llvm-ar-19")
143-
env["LLVM_PROFDATA"] = util.safe_which("llvm-profdata-19")
144-
case "macos":
145-
llvm_prefix = util.get_brew_prefix("llvm")
146-
env["PATH"] = f"{llvm_prefix}/bin:{env['PATH']}"
147-
env["CC"] = f"{llvm_prefix}/bin/clang"
148-
env["LDFLAGS"] = f"-L{llvm_prefix}/lib"
149-
env["CFLAGS"] = f"-I{llvm_prefix}/include"
150138

151139
if util.get_simple_platform() == "macos":
152140
openssl_prefix = util.get_brew_prefix("[email protected]")
@@ -200,24 +188,18 @@ def compile_windows(
200188
if "NOGIL" in flags:
201189
args.append("--disable-gil")
202190
if "CLANG" in flags:
203-
args.extend(
204-
[
205-
"--tail-call-interp",
206-
'"/p:PlatformToolset=clangcl"',
207-
'"/p:LLVMInstallDir=C:\\Program Files\\LLVM"',
208-
'"/p:LLVMToolsVersion=19.1.6"',
209-
]
210-
)
191+
args.append("--tail-call-interp")
192+
if configure_flags := os.environ.get("PYTHON_CONFIGURE_FLAGS"):
193+
args.extend(shlex.split(configure_flags))
211194

212-
with contextlib.chdir(cpython):
213-
subprocess.check_call(
214-
[
215-
"powershell.exe",
216-
Path("PCbuild") / "build.bat",
217-
*args,
218-
],
219-
)
220-
shutil.copytree(get_windows_build_dir(force_32bit), "libs", dirs_exist_ok=True)
195+
subprocess.check_call(
196+
[
197+
"powershell.exe",
198+
Path("PCbuild") / "build.bat",
199+
*args,
200+
],
201+
)
202+
shutil.copytree(get_windows_build_dir(force_32bit), "libs", dirs_exist_ok=True)
221203

222204

223205
def install_pyperformance(venv: PathLike) -> None:

bench_runner/templates/_weekly.src.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
tier2: false
8080
jit: false
8181
nogil: false
82-
clang: true
82+
tailcall: true
8383
secrets: inherit
8484

8585
pystats:

tests/test_gh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ def get_args(args, **kwargs):
5959
"-f",
6060
"nogil=false",
6161
"-f",
62-
"clang=false",
62+
"tailcall=false",
6363
]

0 commit comments

Comments
 (0)