diff --git a/include/vcpkg/base/cache.h b/include/vcpkg/base/cache.h index b61d080a25..edefe182be 100644 --- a/include/vcpkg/base/cache.h +++ b/include/vcpkg/base/cache.h @@ -1,5 +1,7 @@ #pragma once +#include + #include #include #include @@ -46,6 +48,17 @@ namespace vcpkg return m_cache.emplace_hint(it, k, static_cast(f)())->second; } + template + Optional get(const KeyIsh& k) const + { + auto iter = m_cache.find(k); + if (iter != m_cache.end()) + { + return iter->second; + } + return nullopt; + } + private: mutable std::map m_cache; }; diff --git a/include/vcpkg/base/files.h b/include/vcpkg/base/files.h index 7b43319223..f6a3712ca3 100644 --- a/include/vcpkg/base/files.h +++ b/include/vcpkg/base/files.h @@ -198,6 +198,9 @@ namespace vcpkg virtual FileType symlink_status(const Path& target, std::error_code& ec) const = 0; FileType symlink_status(const Path& target, LineInfo li) const noexcept; + virtual int64_t last_write_time(const Path& target, std::error_code& ec) const = 0; + int64_t last_write_time(const Path& target, LineInfo li) const noexcept; + // absolute/system_complete + lexically_normal + fixup_win32_path_case // we don't use real canonical due to issues like: // https://github.com/microsoft/vcpkg/issues/16614 (canonical breaking on some older Windows Server containers) diff --git a/include/vcpkg/base/jsonreader.h b/include/vcpkg/base/jsonreader.h index 542cdb741e..fd779e2a23 100644 --- a/include/vcpkg/base/jsonreader.h +++ b/include/vcpkg/base/jsonreader.h @@ -306,6 +306,15 @@ namespace vcpkg::Json static const NaturalNumberDeserializer instance; }; + struct Int64Deserializer final : IDeserializer + { + LocalizedString type_name() const override; + + Optional visit_integer(Reader&, int64_t value) const override { return value; } + + static Int64Deserializer instance; + }; + struct BooleanDeserializer final : IDeserializer { virtual LocalizedString type_name() const override; diff --git a/include/vcpkg/base/message-data.inc.h b/include/vcpkg/base/message-data.inc.h index 7357d2a412..fd11b0b5f2 100644 --- a/include/vcpkg/base/message-data.inc.h +++ b/include/vcpkg/base/message-data.inc.h @@ -170,6 +170,7 @@ DECLARE_MESSAGE(AndroidHomeDirMissingProps, "source.properties missing in {env_var} directory: {path}") DECLARE_MESSAGE(AnExactVersionString, (), "", "an exact version string") DECLARE_MESSAGE(AnIdentifer, (), "", "an identifier") +DECLARE_MESSAGE(AnInt64, (), "", "a 64-bit integer") DECLARE_MESSAGE(AnObjectContainingVcpkgArtifactsMetadata, (), "'vcpkg-artifacts' is the name of the product feature and should not be localized", diff --git a/include/vcpkg/commands.build.h b/include/vcpkg/commands.build.h index 7dd6481a0c..01daffc1a5 100644 --- a/include/vcpkg/commands.build.h +++ b/include/vcpkg/commands.build.h @@ -230,7 +230,9 @@ namespace vcpkg std::string id; std::string version; std::string hash; - std::string path; + Path c_compiler_path; + Path cxx_compiler_path; + bool from_cache = false; }; struct AbiInfo @@ -251,7 +253,8 @@ namespace vcpkg void compute_all_abis(const VcpkgPaths& paths, ActionPlan& action_plan, const CMakeVars::CMakeVarProvider& var_provider, - const StatusParagraphs& status_db); + const StatusParagraphs& status_db, + UseCompilerInfoCache use_compiler_info_cache = UseCompilerInfoCache::No); struct EnvCache { @@ -262,10 +265,12 @@ namespace vcpkg const Toolset& toolset); const std::string& get_triplet_info(const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, - const Toolset& toolset); + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache); const CompilerInfo& get_compiler_info(const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, - const Toolset& toolset); + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache); private: struct TripletMapEntry @@ -274,6 +279,7 @@ namespace vcpkg Cache triplet_infos; Cache triplet_infos_without_compiler; Cache compiler_info; + Cache> cached_compiler_info; }; Cache m_triplet_cache; Cache m_toolchain_cache; diff --git a/include/vcpkg/fwd/build.h b/include/vcpkg/fwd/build.h index ee0fe89f08..80d881df7a 100644 --- a/include/vcpkg/fwd/build.h +++ b/include/vcpkg/fwd/build.h @@ -93,6 +93,12 @@ namespace vcpkg Yes }; + enum class UseCompilerInfoCache + { + No = 0, + Yes + }; + // These names are intended to match VCPKG_POLICY_Xxx constants settable in portfile.cmake enum class BuildPolicy { diff --git a/include/vcpkg/installedpaths.h b/include/vcpkg/installedpaths.h index 08349eb24f..7bf32e6c40 100644 --- a/include/vcpkg/installedpaths.h +++ b/include/vcpkg/installedpaths.h @@ -23,6 +23,10 @@ namespace vcpkg Path vcpkg_dir_updates() const { return vcpkg_dir() / FileUpdates; } Path lockfile_path() const { return vcpkg_dir() / FileVcpkgLock; } Path triplet_dir(Triplet t) const { return m_root / t.canonical_name(); } + Path compiler_info_cache_file(Triplet t) const + { + return vcpkg_dir() / "compiler_info_cache" / t.canonical_name(); + } Path share_dir(const PackageSpec& p) const { return triplet_dir(p.triplet()) / FileShare / p.name(); } Path usage_file(const PackageSpec& p) const { return share_dir(p) / FileUsage; } Path spdx_file(const PackageSpec& p) const { return share_dir(p) / FileVcpkgSpdxJson; } diff --git a/include/vcpkg/vcpkgpaths.h b/include/vcpkg/vcpkgpaths.h index f0fb8b95f6..27c15483e5 100644 --- a/include/vcpkg/vcpkgpaths.h +++ b/include/vcpkg/vcpkgpaths.h @@ -143,8 +143,12 @@ namespace vcpkg const Toolset& get_toolset(const PreBuildInfo& prebuildinfo) const; const Environment& get_action_env(const PreBuildInfo& pre_build_info, const Toolset& toolset) const; - const std::string& get_triplet_info(const PreBuildInfo& pre_build_info, const Toolset& toolset) const; - const CompilerInfo& get_compiler_info(const PreBuildInfo& pre_build_info, const Toolset& toolset) const; + const std::string& get_triplet_info(const PreBuildInfo& pre_build_info, + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache) const; + const CompilerInfo& get_compiler_info(const PreBuildInfo& pre_build_info, + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache) const; const FeatureFlagSettings& get_feature_flags() const; diff --git a/locales/messages.json b/locales/messages.json index 779bc18bd9..1d2d4632d4 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -138,6 +138,7 @@ "AnArtifactsRegistry": "an artifacts registry", "AnExactVersionString": "an exact version string", "AnIdentifer": "an identifier", + "AnInt64": "a 64-bit integer", "AnObjectContainingVcpkgArtifactsMetadata": "an object containing vcpkg-artifacts metadata", "_AnObjectContainingVcpkgArtifactsMetadata.comment": "'vcpkg-artifacts' is the name of the product feature and should not be localized", "AnOverlayPath": "an overlay path", diff --git a/src/vcpkg/base/files.cpp b/src/vcpkg/base/files.cpp index e466e97163..40866d3106 100644 --- a/src/vcpkg/base/files.cpp +++ b/src/vcpkg/base/files.cpp @@ -1856,6 +1856,18 @@ namespace vcpkg return result; } + int64_t ReadOnlyFilesystem::last_write_time(const Path& target, LineInfo li) const noexcept + { + std::error_code ec; + auto result = this->last_write_time(target, ec); + if (ec) + { + exit_filesystem_call_error(li, ec, __func__, {target}); + } + + return result; + } + Path ReadOnlyFilesystem::almost_canonical(const Path& target, LineInfo li) const { std::error_code ec; @@ -3027,6 +3039,28 @@ namespace vcpkg #endif // ^^^ !_WIN32 } + virtual int64_t last_write_time(const Path& target, std::error_code& ec) const override + { +#if defined(_WIN32) + auto result = stdfs::last_write_time(to_stdfs_path(target), ec); + return result.time_since_epoch().count(); +#else // ^^^ _WIN32 // !_WIN32 vvv + struct stat s; + if (::lstat(target.c_str(), &s) == 0) + { + ec.clear(); +#ifdef __APPLE__ + return s.st_mtimespec.tv_sec * 1'000'000'000 + s.st_mtimespec.tv_nsec; +#else + return s.st_mtim.tv_sec * 1'000'000'000 + s.st_mtim.tv_nsec; +#endif + } + + ec.assign(errno, std::generic_category()); + return {}; +#endif // ^^^ !_WIN32 + } + virtual Path absolute(const Path& target, std::error_code& ec) const override { #if defined(_WIN32) diff --git a/src/vcpkg/base/json.cpp b/src/vcpkg/base/json.cpp index b4066b0688..508398929a 100644 --- a/src/vcpkg/base/json.cpp +++ b/src/vcpkg/base/json.cpp @@ -1114,6 +1114,10 @@ namespace vcpkg::Json const NaturalNumberDeserializer NaturalNumberDeserializer::instance; + LocalizedString Int64Deserializer::type_name() const { return msg::format(msgAnInt64); } + + Int64Deserializer Int64Deserializer::instance; + LocalizedString BooleanDeserializer::type_name() const { return msg::format(msgABoolean); } Optional BooleanDeserializer::visit_boolean(Reader&, bool b) const { return b; } diff --git a/src/vcpkg/commands.build.cpp b/src/vcpkg/commands.build.cpp index 63b344e610..68d8112c1c 100644 --- a/src/vcpkg/commands.build.cpp +++ b/src/vcpkg/commands.build.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -523,9 +524,100 @@ namespace vcpkg }); } + struct CompilerInfoCache + { + CompilerInfo compiler_info; + int64_t c_compiler_last_write_time; + int64_t cxx_compiler_last_write_time; + }; + + struct CompilerInfoCacheDeserializer : Json::IDeserializer + { + LocalizedString type_name() const override { return LocalizedString::from_raw("CompilerInfoCache"); } + + constexpr static StringLiteral ID = "id"; + constexpr static StringLiteral VERSION = "version"; + constexpr static StringLiteral HASH = "hash"; + constexpr static StringLiteral C_COMPILER_PATH = "c_compiler_path"; + constexpr static StringLiteral CXX_COMPILER_PATH = "cxx_compiler_path"; + constexpr static StringLiteral C_COMPILER_PATH_LAST_WRITE_TIME = "c_compiler_path_last_write_time"; + constexpr static StringLiteral CXX_COMPILER_PATH_LAST_WRITE_TIME = "cxx_compiler_path_last_write_time"; + + virtual View valid_fields() const noexcept override + { + static const StringLiteral t[] = {ID, + VERSION, + HASH, + C_COMPILER_PATH, + CXX_COMPILER_PATH, + C_COMPILER_PATH_LAST_WRITE_TIME, + CXX_COMPILER_PATH_LAST_WRITE_TIME}; + return t; + } + + Optional visit_object(Json::Reader& r, const Json::Object& obj) const override + { + CompilerInfoCache cache; + // This is an internal structure never written by a user by hand, so we don't need localization. + r.required_object_field(LocalizedString::from_raw(ID), + obj, + ID, + cache.compiler_info.id, + Json::UntypedStringDeserializer::instance); + r.required_object_field(LocalizedString::from_raw(VERSION), + obj, + VERSION, + cache.compiler_info.version, + Json::UntypedStringDeserializer::instance); + r.required_object_field(LocalizedString::from_raw(HASH), + obj, + HASH, + cache.compiler_info.hash, + Json::UntypedStringDeserializer::instance); + r.required_object_field(LocalizedString::from_raw(C_COMPILER_PATH), + obj, + C_COMPILER_PATH, + cache.compiler_info.c_compiler_path, + Json::PathDeserializer::instance); + r.required_object_field(LocalizedString::from_raw(CXX_COMPILER_PATH), + obj, + CXX_COMPILER_PATH, + cache.compiler_info.cxx_compiler_path, + Json::PathDeserializer::instance); + r.required_object_field(LocalizedString::from_raw(C_COMPILER_PATH_LAST_WRITE_TIME), + obj, + C_COMPILER_PATH_LAST_WRITE_TIME, + cache.c_compiler_last_write_time, + Json::Int64Deserializer::instance); + r.required_object_field(LocalizedString::from_raw(CXX_COMPILER_PATH_LAST_WRITE_TIME), + obj, + CXX_COMPILER_PATH_LAST_WRITE_TIME, + cache.cxx_compiler_last_write_time, + Json::Int64Deserializer::instance); + cache.compiler_info.from_cache = true; + return cache; + } + static CompilerInfoCacheDeserializer instance; + + static Json::Object serialize(const CompilerInfoCache& cache) + { + Json::Object obj; + obj.insert(ID, cache.compiler_info.id); + obj.insert(VERSION, cache.compiler_info.version); + obj.insert(HASH, cache.compiler_info.hash); + obj.insert(C_COMPILER_PATH, cache.compiler_info.c_compiler_path); + obj.insert(CXX_COMPILER_PATH, cache.compiler_info.cxx_compiler_path); + obj.insert(C_COMPILER_PATH_LAST_WRITE_TIME, Json::Value::integer(cache.c_compiler_last_write_time)); + obj.insert(CXX_COMPILER_PATH_LAST_WRITE_TIME, Json::Value::integer(cache.cxx_compiler_last_write_time)); + return obj; + } + }; + CompilerInfoCacheDeserializer CompilerInfoCacheDeserializer::instance; + const CompilerInfo& EnvCache::get_compiler_info(const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, - const Toolset& toolset) + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache) { if (!m_compiler_tracking || pre_build_info.disable_compiler_tracking) { @@ -541,21 +633,59 @@ namespace vcpkg auto&& triplet_entry = get_triplet_cache(fs, triplet_file_path); - return triplet_entry.compiler_info.get_lazy(toolchain_hash, [&]() -> CompilerInfo { - if (m_compiler_tracking) + if (use_compiler_info_cache == UseCompilerInfoCache::Yes) + { + auto maybe_entry = triplet_entry.compiler_info.get(toolchain_hash); + if (maybe_entry) { - return load_compiler_info(paths, pre_build_info, toolset); + return *maybe_entry.get(); } - else + maybe_entry = triplet_entry.cached_compiler_info.get_lazy(toolchain_hash, [&]() -> Optional { + auto cache_file = paths.installed().compiler_info_cache_file(pre_build_info.triplet); + auto& fs = paths.get_filesystem(); + if (fs.exists(cache_file, VCPKG_LINE_INFO)) + { + auto json_object = Json::parse_object(fs.read_contents(cache_file, VCPKG_LINE_INFO), cache_file) + .value_or_exit(VCPKG_LINE_INFO); + Json::Reader reader(cache_file); + CompilerInfoCache cache = reader.visit(json_object, CompilerInfoCacheDeserializer::instance) + .value_or_exit(VCPKG_LINE_INFO); + auto needs_update = [&](const Path& path, int64_t last_write_time) { + return !fs.exists(path, VCPKG_LINE_INFO) || + fs.last_write_time(path, VCPKG_LINE_INFO) != last_write_time; + }; + if (!needs_update(cache.compiler_info.c_compiler_path, cache.c_compiler_last_write_time) && + !needs_update(cache.compiler_info.cxx_compiler_path, cache.cxx_compiler_last_write_time)) + { + return cache.compiler_info; + } + } + return nullopt; + }); + if (maybe_entry) { - return CompilerInfo{}; + return *maybe_entry.get(); } + } + + return triplet_entry.compiler_info.get_lazy(toolchain_hash, [&]() -> CompilerInfo { + auto cache_file = paths.installed().compiler_info_cache_file(pre_build_info.triplet); + auto& fs = paths.get_filesystem(); + auto compiler_info = load_compiler_info(paths, pre_build_info, toolset); + CompilerInfoCache cache; + cache.compiler_info = compiler_info; + cache.c_compiler_last_write_time = fs.last_write_time(compiler_info.c_compiler_path, VCPKG_LINE_INFO); + cache.cxx_compiler_last_write_time = fs.last_write_time(compiler_info.cxx_compiler_path, VCPKG_LINE_INFO); + fs.write_contents_and_dirs( + cache_file, Json::stringify(CompilerInfoCacheDeserializer::serialize(cache)), VCPKG_LINE_INFO); + return compiler_info; }); } const std::string& EnvCache::get_triplet_info(const VcpkgPaths& paths, const PreBuildInfo& pre_build_info, - const Toolset& toolset) + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache) { const auto& fs = paths.get_filesystem(); const auto& triplet_file_path = paths.get_triplet_db().get_triplet_file_path(pre_build_info.triplet); @@ -567,7 +697,7 @@ namespace vcpkg if (m_compiler_tracking && !pre_build_info.disable_compiler_tracking) { return triplet_entry.triplet_infos.get_lazy(toolchain_hash, [&]() -> std::string { - auto& compiler_info = get_compiler_info(paths, pre_build_info, toolset); + auto& compiler_info = get_compiler_info(paths, pre_build_info, toolset, use_compiler_info_cache); return Strings::concat(triplet_entry.hash, '-', toolchain_hash, '-', compiler_info.hash); }); } @@ -722,11 +852,17 @@ namespace vcpkg { compiler_info.id = s.substr(MarkerCompilerCxxId.size()).to_string(); } - static constexpr StringLiteral s_path_marker = "#COMPILER_CXX_PATH#"; - if (Strings::starts_with(s, s_path_marker)) + static constexpr StringLiteral cxx_path_marker = "#COMPILER_CXX_PATH#"; + if (Strings::starts_with(s, cxx_path_marker)) { - const auto compiler_cxx_path = s.substr(s_path_marker.size()); - compiler_info.path.assign(compiler_cxx_path.data(), compiler_cxx_path.size()); + const auto compiler_cxx_path = s.substr(cxx_path_marker.size()); + compiler_info.cxx_compiler_path = compiler_cxx_path; + } + static constexpr StringLiteral c_path_marker = "#COMPILER_C_PATH#"; + if (Strings::starts_with(s, c_path_marker)) + { + const auto compiler_c_path = s.substr(c_path_marker.size()); + compiler_info.c_compiler_path = compiler_c_path; } Debug::println(s); const auto old_buf_size = buf.size(); @@ -752,9 +888,9 @@ namespace vcpkg } Debug::println("Detected compiler hash for triplet ", triplet, ": ", compiler_info.hash); - if (!compiler_info.path.empty()) + if (!compiler_info.cxx_compiler_path.empty()) { - msg::println(msgCompilerPath, msg::path = compiler_info.path); + msg::println(msgCompilerPath, msg::path = compiler_info.cxx_compiler_path); } return compiler_info; } @@ -1161,7 +1297,8 @@ namespace vcpkg InstallPlanAction& action, std::unique_ptr&& proto_pre_build_info, Span dependency_abis, - Cache>& grdk_cache) + Cache>& grdk_cache, + UseCompilerInfoCache use_compiler_info_cache) { Checks::check_exit(VCPKG_LINE_INFO, static_cast(proto_pre_build_info)); const auto& pre_build_info = *proto_pre_build_info; @@ -1181,7 +1318,7 @@ namespace vcpkg return; } - abi_info.compiler_info = paths.get_compiler_info(*abi_info.pre_build_info, toolset); + abi_info.compiler_info = paths.get_compiler_info(*abi_info.pre_build_info, toolset, use_compiler_info_cache); for (auto&& dep_abi : dependency_abis) { if (dep_abi.value.empty()) @@ -1197,7 +1334,7 @@ namespace vcpkg std::vector abi_tag_entries(dependency_abis.begin(), dependency_abis.end()); - const auto& triplet_abi = paths.get_triplet_info(pre_build_info, toolset); + const auto& triplet_abi = paths.get_triplet_info(pre_build_info, toolset, use_compiler_info_cache); abi_info.triplet_abi.emplace(triplet_abi); const auto& triplet_canonical_name = action.spec.triplet().canonical_name(); abi_tag_entries.emplace_back(AbiTagTriplet, triplet_canonical_name); @@ -1348,7 +1485,8 @@ namespace vcpkg void compute_all_abis(const VcpkgPaths& paths, ActionPlan& action_plan, const CMakeVars::CMakeVarProvider& var_provider, - const StatusParagraphs& status_db) + const StatusParagraphs& status_db, + UseCompilerInfoCache use_compiler_info_cache) { Cache> grdk_cache; for (auto it = action_plan.install_actions.begin(); it != action_plan.install_actions.end(); ++it) @@ -1389,7 +1527,8 @@ namespace vcpkg action.spec.triplet(), var_provider.get_tag_vars(action.spec).value_or_exit(VCPKG_LINE_INFO)), dependency_abis, - grdk_cache); + grdk_cache, + use_compiler_info_cache); } } diff --git a/src/vcpkg/commands.set-installed.cpp b/src/vcpkg/commands.set-installed.cpp index 9fbbe44ce5..4eb77d29de 100644 --- a/src/vcpkg/commands.set-installed.cpp +++ b/src/vcpkg/commands.set-installed.cpp @@ -165,6 +165,32 @@ namespace vcpkg return specs_installed; } + static bool is_action_plan_fulfilled(const ActionPlan& action_plan, const StatusParagraphs& status_db) + { + std::set all_abis; + for (const auto& action : action_plan.install_actions) + { + all_abis.insert(action.abi_info.value_or_exit(VCPKG_LINE_INFO).package_abi); + } + + for (auto&& status_pgh : status_db) + { + if (!status_pgh->is_installed()) continue; + if (status_pgh->package.is_feature()) continue; + + const auto& abi = status_pgh->package.abi; + if (abi.empty()) + { + return false; + } + if (all_abis.erase(abi) == 0) + { + return false; + } + } + return all_abis.empty(); + } + void command_set_installed_and_exit_ex(const VcpkgCmdArguments& args, const VcpkgPaths& paths, Triplet host_triplet, @@ -179,7 +205,7 @@ namespace vcpkg auto& fs = paths.get_filesystem(); cmake_vars.load_tag_vars(action_plan, host_triplet); - compute_all_abis(paths, action_plan, cmake_vars, {}); + compute_all_abis(paths, action_plan, cmake_vars, {}, UseCompilerInfoCache::Yes); std::vector user_requested_specs; for (const auto& action : action_plan.install_actions) @@ -217,7 +243,32 @@ namespace vcpkg // currently (or once) installed specifications auto status_db = database_load_collapse(fs, paths.installed()); + + bool used_cached_compiler_info = + Util::any_of(action_plan.install_actions, [](const InstallPlanAction& install_action) { + return install_action.abi_info.value_or_exit(VCPKG_LINE_INFO) + .compiler_info.value_or_exit(VCPKG_LINE_INFO) + .from_cache; + }); + + if (used_cached_compiler_info) + { + if (!is_action_plan_fulfilled(action_plan, status_db)) + { + // we have to install something, so get fresh compiler infos + for (auto& install_action : action_plan.install_actions) + { + install_action.abi_info.clear(); + } + compute_all_abis(paths, action_plan, cmake_vars, {}); + used_cached_compiler_info = false; + } + } adjust_action_plan_to_status_db(action_plan, status_db); + if (used_cached_compiler_info) + { + Checks::check_exit(VCPKG_LINE_INFO, action_plan.empty()); + } print_plan(action_plan, paths.builtin_ports_directory()); diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp index 06f52c5801..ad6ad0e06f 100644 --- a/src/vcpkg/vcpkgpaths.cpp +++ b/src/vcpkg/vcpkgpaths.cpp @@ -1374,14 +1374,18 @@ namespace vcpkg return m_pimpl->m_env_cache.get_action_env(*this, pre_build_info, toolset); } - const std::string& VcpkgPaths::get_triplet_info(const PreBuildInfo& pre_build_info, const Toolset& toolset) const + const std::string& VcpkgPaths::get_triplet_info(const PreBuildInfo& pre_build_info, + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache) const { - return m_pimpl->m_env_cache.get_triplet_info(*this, pre_build_info, toolset); + return m_pimpl->m_env_cache.get_triplet_info(*this, pre_build_info, toolset, use_compiler_info_cache); } - const CompilerInfo& VcpkgPaths::get_compiler_info(const PreBuildInfo& pre_build_info, const Toolset& toolset) const + const CompilerInfo& VcpkgPaths::get_compiler_info(const PreBuildInfo& pre_build_info, + const Toolset& toolset, + UseCompilerInfoCache use_compiler_info_cache) const { - return m_pimpl->m_env_cache.get_compiler_info(*this, pre_build_info, toolset); + return m_pimpl->m_env_cache.get_compiler_info(*this, pre_build_info, toolset, use_compiler_info_cache); } const FeatureFlagSettings& VcpkgPaths::get_feature_flags() const { return m_pimpl->m_ff_settings; }