diff options
| author | Francois Rivard <30326057+RoguePointer80@users.noreply.github.com> | 2020-09-27 21:18:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-27 18:18:27 -0700 |
| commit | 741c8cbecde77f771f8c05f00f59a436a2b4213b (patch) | |
| tree | 2c77fb7d283deb47a0ad612764d6dcc243f380b9 /toolsrc/include | |
| parent | 64a281b865f31cf846c1e36d635361c2eaa985f4 (diff) | |
| download | vcpkg-741c8cbecde77f771f8c05f00f59a436a2b4213b.tar.gz vcpkg-741c8cbecde77f771f8c05f00f59a436a2b4213b.zip | |
[vcpkg] Add compiler info to nuspec description (#13571)
* Add compiler info to nuspec description
* Run clang-format on some files
* Fix the unit tests
* [vcpkg] Clarify NuGet description to note 'CXX compiler'
* [vcpkg] Fix tests
Co-authored-by: frivard <frivard@coveo.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/build.h | 10 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkgpaths.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index 83d797fd1..99effe475 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -305,6 +305,13 @@ namespace vcpkg::Build fs::path tag_file; }; + struct CompilerInfo + { + std::string id; + std::string version; + std::string hash; + }; + struct AbiInfo { std::unique_ptr<PreBuildInfo> pre_build_info; @@ -312,6 +319,7 @@ namespace vcpkg::Build Optional<const std::string&> triplet_abi; std::string package_abi; Optional<fs::path> abi_tag_file; + Optional<const CompilerInfo&> compiler_info; }; void compute_all_abis(const VcpkgPaths& paths, @@ -325,12 +333,14 @@ namespace vcpkg::Build const System::Environment& get_action_env(const VcpkgPaths& paths, const AbiInfo& abi_info); const std::string& get_triplet_info(const VcpkgPaths& paths, const AbiInfo& abi_info); + const CompilerInfo& get_compiler_info(const VcpkgPaths& paths, const AbiInfo& abi_info); private: struct TripletMapEntry { std::string hash; Cache<std::string, std::string> compiler_hashes; + Cache<std::string, CompilerInfo> compiler_info; }; Cache<fs::path, TripletMapEntry> m_triplet_cache; Cache<fs::path, std::string> m_toolchain_cache; diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 8abc84129..da0e2ec14 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -37,6 +37,7 @@ namespace vcpkg { struct PreBuildInfo; struct AbiInfo; + struct CompilerInfo; } namespace System @@ -121,6 +122,7 @@ namespace vcpkg const System::Environment& get_action_env(const Build::AbiInfo& abi_info) const; const std::string& get_triplet_info(const Build::AbiInfo& abi_info) const; + const Build::CompilerInfo& get_compiler_info(const Build::AbiInfo& abi_info) const; bool manifest_mode_enabled() const { return get_manifest().has_value(); } void track_feature_flag_metrics() const; |
