diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-03-22 10:01:12 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-03-22 10:01:12 -0700 |
| commit | 1f62b32641045fe377ee80ff1854a785344687d2 (patch) | |
| tree | ad30ab93b8c2bd4d96727f63ae0210caefc0d2b3 | |
| parent | c80650593399fb2dddc9dff74016f3c5f3e29b28 (diff) | |
| download | vcpkg-1f62b32641045fe377ee80ff1854a785344687d2.tar.gz vcpkg-1f62b32641045fe377ee80ff1854a785344687d2.zip | |
[vcpkg] Sort abi tags to ensure stability
| -rw-r--r-- | toolsrc/include/vcpkg/build.h | 5 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg/build.cpp | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 8c4d7b575..1c22d39d8 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -209,6 +209,11 @@ namespace vcpkg::Build { std::string key; std::string value; + + bool operator<(const AbiEntry& other) const + { + return key < other.key || (key == other.key && value < other.value); + } }; struct AbiTagAndFile diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index ebded2736..953e77460 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -449,6 +449,8 @@ namespace vcpkg::Build if (config.build_package_options.use_head_version == UseHeadVersion::YES) abi_tag_entries.emplace_back(AbiEntry{"head", ""}); + Util::sort(abi_tag_entries); + std::string full_abi_info = Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); |
