Skip to content

VCPKG_DISABLE_COMPILER_TRACKING still puts compiler hash in triplet_abi #1999

@bas-van-der-woude-qps

Description

@bas-van-der-woude-qps

I'm copying this bug from microsoft/vcpkg#50920 because I expect it might belong here.

Describe the bug
I'm looking to use vcpkg somewhat similarly to nuget with a private shared binary cache. To that end, I've done the following:

  • In my custom triplets: set(VCPKG_DISABLE_COMPILER_TRACKING TRUE)
  • In CMakePresets.json's cache variables: "VCPKG_INSTALL_OPTIONS": "--x-abi-tools-use-exact-versions;--debug"

This should render the ABI hashes stable regardless of host tool or compiler versions. However, the compiler hash is still present in the ABI entries as the last segment of the triplet_abi entry. This renders these options functionally useless in my opinion. I don't care if I bumped my compiler version by 0.0.1.

Environment

  • OS: Windows 11 25H2
  • Compiler: MS Build Tools 18 (various versions - updating between builds is what triggers this issue)
  • vcpkg: 572a74141fcaa3e4fb46756b35602e2cfdfe8bb9 (2025-10-20)

To Reproduce
Steps to reproduce the behavior:

  1. Create custom triplet with set(VCPKG_DISABLE_COMPILER_TRACKING TRUE)
  2. vcpkg install --triplet=[your custom triplet] --x-abi-tools-use-exact-versions --debug (or equivalent via Rider/Visual Studio/CMake build)
  3. Update your compiler to a new version (in my example, MS Build Tools 18)
  4. Repeat step 2
  5. vcpkg rebuilds your packages for no reason. Inspecting the <abientries> debug output reveals that the last section of the triplet_abi entry has changed, and is identical to the COMPILER_HASH output above it.

Expected behavior
If VCPKG_DISABLE_COMPILER_TRACKING is true, lop off the last section of the triplet_abi ABI entry.
Or more generally, VCPKG_DISABLE_COMPILER_TRACKING should actually disable compiler tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions