Skip to content
systemcoding.dev
Toolchains

Pin the port registry version with builtin-baseline

Pin every port to a known registry commit with builtin-baseline in vcpkg.json, so versions resolve the same way on every machine.

1 min read
Summarize in AI

In manifest mode, vcpkg picks versions from its registry, and the registry moves. Without a baseline, "latest" means whatever your checkout of vcpkg happens to contain. The builtin-baseline field fixes the registry state to a commit.

vcpkg.jsonJSON
{
  "name": "demo",
  "version": "1.0.0",
  "builtin-baseline": "3426db05b996481ca31e95fff3734cf23e0f51bc",
  "dependencies": ["zlib", "fmt"]
}
Shell
git -C "$VCPKG_ROOT" rev-parse HEAD
vcpkg install
Text
3426db05b996481ca31e95fff3734cf23e0f51bc
Detecting compiler hash for triplet x64-linux...
The following packages will be built and installed:
    fmt:[email protected]
    zlib:[email protected]

Each version listed is the highest one the registry offered at that baseline. The baseline is the commit hash of the vcpkg repository, which vcpkg x-update-baseline --add-initial-baseline writes for you. It is required once you use version>= constraints or overrides, as described in versioning.

The hash above is only an example of a 40-character commit; yours comes from your own registry clone. Bump it deliberately and review the diff in the packages it changes, because a new baseline can move many ports at once.

Taggedcvcpkg
Share

More snippets

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.