Skip to content

Conversation

@BillyONeal
Copy link
Member

https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=12598442&view=logs&j=4cdc4065-f43d-507c-ee4e-5b139a5033dc&t=78a6c2bd-8a92-57c2-fdda-4275d0cbc2ca

D:\a_work\1\a\drop\vcpkg.exe: warning BA6004: 'vcpkg.exe' was compiled with COMDAT folding (/OPT:ICF) disabled, increasing binary size. For VC projects use ItemDefinitionGroup - Link - EnableCOMDATFolding property with 'true' value. D:\a_work\1\a\drop\vcpkg.exe: warning BA6005: 'vcpkg.exe' was compiled with Optimize References (/OPT:REF) disabled, increasing binary size. For VC projects use ItemDefinitionGroup - Link - OptimizeReferences property with 'true' value. D:\a_work\1\a\drop\vcpkg.exe: warning BA6006: 'vcpkg.exe' was compiled without Link Time Code Generation (/LTCG). Enabling LTCG can improve optimizations and performance. For VC projects use WholeProgramOptimization property with 'true' value.

On my local testing this reduces vcpkg.exe from 8MB to 5MB.

…2&view=logs&j=4cdc4065-f43d-507c-ee4e-5b139a5033dc&t=78a6c2bd-8a92-57c2-fdda-4275d0cbc2ca

D:\a\_work\1\a\drop\vcpkg.exe: warning BA6004: 'vcpkg.exe' was compiled with COMDAT folding (/OPT:ICF) disabled, increasing binary size.
For VC projects use ItemDefinitionGroup - Link - EnableCOMDATFolding property with 'true' value.
D:\a\_work\1\a\drop\vcpkg.exe: warning BA6005: 'vcpkg.exe' was compiled with Optimize References (/OPT:REF) disabled, increasing binary size.
For VC projects use ItemDefinitionGroup - Link - OptimizeReferences property with 'true' value.
D:\a\_work\1\a\drop\vcpkg.exe: warning BA6006: 'vcpkg.exe' was compiled without Link Time Code Generation (/LTCG). Enabling LTCG can improve optimizations and performance.
For VC projects use WholeProgramOptimization property with 'true' value.

On my local testing this reduces vcpkg.exe from 8MB to 5MB.
@Osyotr
Copy link
Contributor

Osyotr commented Oct 16, 2025

Might as well add try to add -s to linux builds (strip shaves 1.1Mb from x64 glibc binary).

@BillyONeal
Copy link
Member Author

Might as well add try to add -s to linux builds (strip shaves 1.1Mb from x64 glibc binary).

We probably would need to have out of band debug info in such cases since one normally wants to be able to debug crash dumps....

@BillyONeal BillyONeal enabled auto-merge (squash) October 23, 2025 21:25
@BillyONeal BillyONeal merged commit 1d7fdac into microsoft:main Oct 24, 2025
7 checks passed
@BillyONeal BillyONeal deleted the ltcg branch October 24, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants