Skip to content

Commit

Permalink
[vcpkg] Remove unused function (microsoft#12837)
Browse files Browse the repository at this point in the history
updating use of Span<>

after clang-format

two changes undone
  • Loading branch information
ignacionr authored Aug 17, 2020
1 parent 59cf64e commit 1880c89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
19 changes: 0 additions & 19 deletions src/vcpkg/base/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,25 +160,6 @@ namespace vcpkg
return s_home;
}
#else
static const ExpectedS<fs::path>& get_xdg_config_home() noexcept
{
static ExpectedS<fs::path> s_home = [] {
auto maybe_home = System::get_environment_variable("XDG_CONFIG_HOME");
if (auto p = maybe_home.get())
{
return ExpectedS<fs::path>(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<fs::path>& get_xdg_cache_home() noexcept
{
static ExpectedS<fs::path> s_home = [] {
Expand Down
11 changes: 7 additions & 4 deletions src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PackageSpec, 1>{full_spec.package_spec});
var_provider.load_dep_info_vars({{full_spec.package_spec}});

StatusParagraphs status_db = database_load_check(paths);

Expand Down Expand Up @@ -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));

Expand Down Expand Up @@ -339,10 +339,13 @@ namespace vcpkg::Build
else
return System::cmd_execute_modify_env(build_env_cmd, clean_env);
});
}
#else
const System::Environment& EnvCache::get_action_env(const VcpkgPaths&, const AbiInfo&)
{
return System::get_clean_environment();
#endif
}
#endif

static std::string load_compiler_hash(const VcpkgPaths& paths, const AbiInfo& abi_info);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1880c89

Please sign in to comment.