Right now, the version information is interpolated into version.cpp, which is linked into libbase. As a result, if the version information changes (as it does on every patch build), pretty much all libraries and executables must be relinked.
However, only a few programs actually need this information - mostly the shell, the core database server, and mongos.
If we could use dependency injection to have version reporting fall back to defaulted values, we could sever that linkage from base to the interpolated data, and then dependency inject the interpolated values only from the programs that meaningfully need it.
This would speed up all re-links across a change in git-hash or version, but would also dramatically speed up --cache builds on the CI system.
- duplicates
-
SERVER-11290 Don't put linked products in build cache
- Closed
- is depended on by
-
SERVER-25591 Use --cache=nolinked for cache builds
- Closed