Windows application manifests provide several benefits—such as enhanced security settings, and the ability to set a process-wide code page (required for #32380), as well as granular control over supported Windows versions. Most of these benefits lie beyond the scope of this PR and will be evaluated separately.
On the current master branch @ fc6346dbc8dc3db40aad4079210332b5f8b332ed, the linker generates and embeds a manifest only when building with MSVC:
0<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
2 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
3 <security>
4 <requestedPrivileges>
5 <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
6 </requestedPrivileges>
7 </security>
8 </trustInfo>
9</assembly>
However, this manifest fails validation:
0> mt.exe -nologo -inputresource:build\bin\Release\bitcoind.exe -validate_manifest
1
2mt.exe : general error 10100ba: The manifest is missing the definition identity.
This PR unifies manifest embedding for both native and cross-compilation builds.
Here is the change in the manifest on Windows:
0--- bitcoind-master.manifest
1+++ bitcoind-pr.manifest
2@@ -1,5 +1,6 @@
3 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
4 <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
5+ <assemblyIdentity type="win32" name="org.bitcoincore.bitcoind" version="29.99.0.0"></assemblyIdentity>
6 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
7 <security>
8 <requestedPrivileges>
which effectively resolves the “missing the definition identity” error.
Finally, “Get bitcoind manifest” steps have been added to the Windows CI jobs to ensure the manifest is embedded and validated.