summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2024-05-07 21:01:18 (GMT)
committerGitHub <noreply@github.com>2024-05-07 21:01:18 (GMT)
commit460546529b0959ce9528dec1c5cd836dcc04ad2c (patch)
tree75764579172e9e1c5ee3a1cf9699965e1632bd3e
parentf5488550614858fdc7b442076fe73bdfa3cdd738 (diff)
downloadcpython-460546529b0959ce9528dec1c5cd836dcc04ad2c.zip
cpython-460546529b0959ce9528dec1c5cd836dcc04ad2c.tar.gz
cpython-460546529b0959ce9528dec1c5cd836dcc04ad2c.tar.bz2
gh-118734: Fixes Windows build when Use_TIER2 is unspecified (#118735)
-rw-r--r--Misc/NEWS.d/next/Build/2024-05-07-21-15-47.gh-issue-118734.--GHiS.rst2
-rw-r--r--PCbuild/_testinternalcapi.vcxproj2
-rw-r--r--PCbuild/build.bat2
-rw-r--r--PCbuild/pythoncore.vcxproj2
4 files changed, 5 insertions, 3 deletions
diff --git a/Misc/NEWS.d/next/Build/2024-05-07-21-15-47.gh-issue-118734.--GHiS.rst b/Misc/NEWS.d/next/Build/2024-05-07-21-15-47.gh-issue-118734.--GHiS.rst
new file mode 100644
index 0000000..40e8e06
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-05-07-21-15-47.gh-issue-118734.--GHiS.rst
@@ -0,0 +1,2 @@
+Fixes Windows build when invoked directly (not through the :file:`build.bat`
+script) without specifying a value for ``UseTIER2``.
diff --git a/PCbuild/_testinternalcapi.vcxproj b/PCbuild/_testinternalcapi.vcxproj
index d4cd8ad..87db569 100644
--- a/PCbuild/_testinternalcapi.vcxproj
+++ b/PCbuild/_testinternalcapi.vcxproj
@@ -111,7 +111,7 @@
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions Condition="'$(UseJIT)' == 'true'">_Py_JIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(UseTIER2)' != '0'">_Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(UseTIER2)' != '' and '$(UseTIER2)' != '0'">_Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 13bd895..6c76f09 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -68,7 +68,7 @@ set verbose=/nologo /v:m /clp:summary
set kill=
set do_pgo=
set pgo_job=-m test --pgo
-set UseTIER2=0
+set UseTIER2=
:CheckOpts
if "%~1"=="-h" goto Usage
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index b17e782..16fb424 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -105,7 +105,7 @@
<PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(UseJIT)' == 'true'">_Py_JIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(UseTIER2)' != '0'">_Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(UseTIER2)' != '' and '$(UseTIER2)' != '0'">_Py_TIER2=$(UseTIER2);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>