Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add optimizing flag WITH_COMPUTED_GOTOS to support such builds using
clang-cl on Windows. Patch by Chris Eibl.
  • Loading branch information
chris-eibl committed Mar 15, 2025
commit 98de4c1d08af0212d5e19415f76b8b60d84d8178
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add optimizing flag `WITH_COMPUTED_GOTOS` to support such builds using
clang-cl on Windows. Patch by Chris Eibl.
Comment thread
chris-eibl marked this conversation as resolved.
Outdated
1 change: 1 addition & 0 deletions PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
14 changes: 14 additions & 0 deletions PCbuild/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,20 @@ See
for more on this topic.


Optimization flags
------------------
Comment thread
chris-eibl marked this conversation as resolved.
You can set optimization flags either via
* environment variables, e.g.
set WITH_COMPUTED_GOTOS=true
* or pass them as parameters to `build.bat`, e.g.
build.bat "/p:WITH_COMPUTED_GOTOS=true"
* or put them in `msbuild.rsp` in the `PCbuild` directory, one flag per line
Comment thread
chris-eibl marked this conversation as resolved.
Outdated

Supported flags are:
* WITH_COMPUTED_GOTOS: build the interpreter using "computed gotos".
Currently only supported by clang-cl.
Comment thread
chris-eibl marked this conversation as resolved.
Outdated


Static library
--------------

Expand Down