From 5dd2b6736b7397e740d54ec2d748b56bd56350e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacio=20Rodr=C3=ADguez?= Date: Mon, 17 Aug 2020 22:31:45 +0700 Subject: [PATCH] [vcpkg] Remove unused function (#12837) updating use of Span<> after clang-format two changes undone --- toolsrc/src/vcpkg/base/system.cpp | 19 ------------------- toolsrc/src/vcpkg/build.cpp | 15 +++++++++------ 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 800a0a23b3..cbb50fe27e 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -160,25 +160,6 @@ namespace vcpkg return s_home; } #else - static const ExpectedS& get_xdg_config_home() noexcept - { - static ExpectedS s_home = [] { - auto maybe_home = System::get_environment_variable("XDG_CONFIG_HOME"); - if (auto p = maybe_home.get()) - { - return ExpectedS(fs::u8path(*p)); - } - else - { - return System::get_home_dir().map([](fs::path home) { - home /= fs::u8path(".config"); - return home; - }); - } - }(); - return s_home; - } - static const ExpectedS& get_xdg_cache_home() noexcept { static ExpectedS s_home = [] { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 92dedd8dba..2eb188cc1c 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -88,7 +88,7 @@ namespace vcpkg::Build { auto var_provider_storage = CMakeVars::make_triplet_cmake_var_provider(paths); auto& var_provider = *var_provider_storage; - var_provider.load_dep_info_vars(std::array{full_spec.package_spec}); + var_provider.load_dep_info_vars({{full_spec.package_spec}}); StatusParagraphs status_db = database_load_check(paths); @@ -301,9 +301,9 @@ namespace vcpkg::Build })); } +#if defined(_WIN32) const System::Environment& EnvCache::get_action_env(const VcpkgPaths& paths, const AbiInfo& abi_info) { -#if defined(_WIN32) std::string build_env_cmd = make_build_env_cmd(*abi_info.pre_build_info, abi_info.toolset.value_or_exit(VCPKG_LINE_INFO)); @@ -339,10 +339,13 @@ namespace vcpkg::Build else return System::cmd_execute_modify_env(build_env_cmd, clean_env); }); -#else - return System::get_clean_environment(); -#endif } +#else + const System::Environment& EnvCache::get_action_env(const VcpkgPaths&, const AbiInfo&) + { + return System::get_clean_environment(); + } +#endif static std::string load_compiler_hash(const VcpkgPaths& paths, const AbiInfo& abi_info); @@ -523,7 +526,7 @@ namespace vcpkg::Build } Checks::check_exit(VCPKG_LINE_INFO, !compiler_hash.empty(), - "Error occured while detecting compiler information. Pass `--debug` for more information."); + "Error occurred while detecting compiler information. Pass `--debug` for more information."); Debug::print("Detecting compiler hash for triplet ", triplet, ": ", compiler_hash, "\n"); return compiler_hash;