Add /PDBALTPATH:%_PDB% to release builds

/PDBALTPATH:%_PDB% strips the path info from the reference in the DLL to the pdb, makeing the build more deterministic.
This commit is contained in:
Victor Derks 2021-04-02 22:29:16 +02:00
parent 0ed5a5e332
commit 8a7c68b29e
No known key found for this signature in database
GPG Key ID: 3CAD1C98620F0A27

View File

@ -9,20 +9,12 @@
<IntDir>$(MSBuildThisFileDirectory)intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Platform)'=='Win32'">$(MSBuildThisFileDirectory)intermediate\$(MSBuildProjectName)\x86\$(Configuration)\</IntDir>
<!-- The C runtime is provided by the OS on the Windows platform (Universal C Runtime (CRT)),
it is necesarry to explicitly define which version to use.
At the momement there is no way to specify to use just the latest version. -->
<!-- The C runtime is provided by the OS on the Windows platform (Universal C Runtime (CRT)) -->
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<!-- Use the latest released C# language version -->
<LangVersion>latest</LangVersion>
<!-- Default character set is Unicode (UTF16), defines _UNICODE and UNICODE. -->
<!-- Default Windows API character set is Unicode (UTF16), defines _UNICODE and UNICODE. -->
<CharacterSet>Unicode</CharacterSet>
<!-- Define treat warnings as errors for C# projects -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)default.ruleset</CodeAnalysisRuleSet>
<VcpkgConfiguration Condition="'$(Configuration)' == 'Checked'">Debug</VcpkgConfiguration>
@ -65,7 +57,7 @@
<!-- Use all cores to speed up the compilation (MS recommended best practice). -->
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<!-- Explicit define that all projects are compiled according the latest offical C++ standard -->
<!-- Explicit define that all projects are compiled according the latest offical C++14 standard -->
<LanguageStandard>stdcpp14</LanguageStandard>
<!-- Explicit disable non conforming MSVC compiler options that are not compatible with the C++ standard -->
@ -140,6 +132,9 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<LinkIncremental>false</LinkIncremental>
<!-- Store only the filename of the PDB file into the .exe/.dll for deterministic builds. -->
<AdditionalOptions>/PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>