Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 6d58f8d

Browse files
committed
Issue 24476: Statically links vcruntime140.dll and removes it from the installer
1 parent 4ab4ac8 commit 6d58f8d

File tree

10 files changed

+7
-148
lines changed

10 files changed

+7
-148
lines changed

PCbuild/pyproject.props

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<IntrinsicFunctions>true</IntrinsicFunctions>
3333
<StringPooling>true</StringPooling>
3434
<ExceptionHandling></ExceptionHandling>
35-
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
35+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
3636
<FunctionLevelLinking>true</FunctionLevelLinking>
3737
<WarningLevel>Level3</WarningLevel>
3838
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -43,7 +43,7 @@
4343
<ClCompile Condition="$(Configuration) == 'Debug'">
4444
<Optimization>Disabled</Optimization>
4545
<WholeProgramOptimization>false</WholeProgramOptimization>
46-
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
46+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
4747
</ClCompile>
4848
<Link>
4949
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -53,7 +53,9 @@
5353
<RandomizedBaseAddress>true</RandomizedBaseAddress>
5454
<DataExecutionPrevention>true</DataExecutionPrevention>
5555
<SuppressStartupBanner>true</SuppressStartupBanner>
56-
<IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
56+
<AdditionalDependencies Condition="$(Configuration) == 'Debug'">ucrtd.lib;%(AdditionalDependencies)</AdditionalDependencies>
57+
<AdditionalDependencies Condition="$(Configuration) != 'Debug'">ucrt.lib;%(AdditionalDependencies)</AdditionalDependencies>
58+
<IgnoreSpecificDefaultLibraries>LIBC;libucrt.lib;libucrtd.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
5759
<TargetMachine>MachineX86</TargetMachine>
5860
<TargetMachine Condition="'$(Platform)' == 'x64'">MachineX64</TargetMachine>
5961
<ProfileGuidedDatabase Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase>

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,8 +2402,6 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
24022402
// Check whether at least CRT v10.0.9924.0 is available.
24032403
// It should only be installed as a Windows Update package, which means
24042404
// we don't need to worry about 32-bit/64-bit.
2405-
// However, since the WU package does not include vcruntime140.dll, we
2406-
// still install that ourselves.
24072405
LPCWSTR crtFile = L"api-ms-win-crt-runtime-l1-1-0.dll";
24082406

24092407
DWORD cbVer = GetFileVersionInfoSizeW(crtFile, nullptr);

Tools/msi/bundle/bundle.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
</ItemDefinitionGroup>
6262
<ItemGroup>
6363
<Package Include="..\core\core*.wixproj" />
64-
<Package Include="..\crt\crt*.wixproj" />
6564
<Package Include="..\dev\dev*.wixproj" />
6665
<Package Include="..\doc\doc*.wixproj" />
6766
<Package Include="..\exe\exe*.wixproj" />

Tools/msi/bundle/packagegroups/crt.wxs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,6 @@
66
<PackageGroupRef Id="crt_14.0_v6.1" />
77
<PackageGroupRef Id="crt_14.0_v6.2" />
88
<PackageGroupRef Id="crt_14.0_v6.3" />
9-
10-
<MsiPackage Id="crt_AllUsers"
11-
SourceFile="crt.msi"
12-
Compressed="$(var.CompressMSI)"
13-
DownloadUrl="$(var.DownloadUrl)"
14-
ForcePerMachine="yes"
15-
InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip)">
16-
<!-- TARGETDIR will be ignored, but must still be provided -->
17-
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
18-
</MsiPackage>
19-
20-
<MsiPackage Id="crt_JustForMe"
21-
SourceFile="crt.msi"
22-
Compressed="$(var.CompressMSI)"
23-
DownloadUrl="$(var.DownloadUrl)"
24-
ForcePerMachine="no"
25-
InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip)">
26-
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
27-
</MsiPackage>
289
</PackageGroup>
2910
</Fragment>
3011

Tools/msi/crt/crt.wixproj

Lines changed: 0 additions & 20 deletions
This file was deleted.

Tools/msi/crt/crt.wxs

Lines changed: 0 additions & 26 deletions
This file was deleted.

Tools/msi/crt/crt_en-US.wxl

Lines changed: 0 additions & 5 deletions
This file was deleted.

Tools/msi/crt/crt_files.wxs

Lines changed: 0 additions & 20 deletions
This file was deleted.

Tools/msi/crt/crtlicense.txt

Lines changed: 0 additions & 47 deletions
This file was deleted.

Tools/msi/exe/crtlicense.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ Additional Conditions for this Windows binary build
55

66
This program is linked with and uses Microsoft Distributable Code,
77
copyrighted by Microsoft Corporation. The Microsoft Distributable Code
8-
includes the following files:
9-
10-
msvcr90.dll
11-
msvcp90.dll
12-
msvcm90.dll
8+
is embedded in each .exe, .dll and .pyd file as a result of running
9+
the code through a linker.
1310

1411
If you further distribute programs that include the Microsoft
1512
Distributable Code, you must comply with the restrictions on

0 commit comments

Comments
 (0)