mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
GH-131278: Add option to build with computed gotos on Windows with clang-cl (GH-131279)
This commit is contained in:
parent
94f4d87aeb
commit
468a7aaeb4
3 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
Add optimizing flag ``WITH_COMPUTED_GOTOS`` to Windows builds for when
|
||||
using a compiler that supports it (currently clang-cl). Patch by Chris Eibl.
|
|
@ -107,6 +107,7 @@
|
|||
<PreprocessorDefinitions Condition="'$(UseJIT)' == 'true'">_Py_JIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(UseTIER2)' != '' and '$(UseTIER2)' != '0'">_Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(UseTailCallInterp)' == 'true'">Py_TAIL_CALL_INTERP=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(WITH_COMPUTED_GOTOS)' != ''">HAVE_COMPUTED_GOTOS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
|
|
@ -310,6 +310,27 @@ See
|
|||
for more on this topic.
|
||||
|
||||
|
||||
Optimization flags
|
||||
------------------
|
||||
|
||||
You can set optimization flags either via
|
||||
|
||||
* environment variables, for example:
|
||||
|
||||
set WITH_COMPUTED_GOTOS=true
|
||||
|
||||
* or pass them as parameters to `build.bat`, for example:
|
||||
|
||||
build.bat "/p:WITH_COMPUTED_GOTOS=true"
|
||||
|
||||
* or put them in `msbuild.rsp` in the `PCbuild` directory, one flag per line.
|
||||
|
||||
Supported flags are:
|
||||
|
||||
* WITH_COMPUTED_GOTOS: build the interpreter using "computed gotos".
|
||||
Currently only supported by clang-cl.
|
||||
|
||||
|
||||
Static library
|
||||
--------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue