Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/clang10 linux #12837

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions toolsrc/src/vcpkg/base/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,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 toolsrc/src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,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 @@ -302,9 +302,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 @@ -340,10 +340,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 @@ -524,7 +527,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