@@ -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 ("openssl@1.1" )
@@ -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
223205def install_pyperformance (venv : PathLike ) -> None :
0 commit comments