Skip to content

Commit

Permalink
Don't emit the 'vs prompt' warning when targeting arm64ec from an arm…
Browse files Browse the repository at this point in the history
…64 developer command prompt.

Partial response to microsoft/vcpkg#40158
  • Loading branch information
BillyONeal committed Jan 22, 2025
1 parent 1a23f1a commit 3389b4c
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/vcpkg/commands.install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1306,20 +1306,19 @@ namespace vcpkg
#if defined(_WIN32)
const auto maybe_common_triplet = Util::common_projection(
action_plan.install_actions, [](const InstallPlanAction& to_install) { return to_install.spec.triplet(); });
if (maybe_common_triplet)
if (auto common_triplet = maybe_common_triplet.get())
{
const auto& common_triplet = maybe_common_triplet.value_or_exit(VCPKG_LINE_INFO);
const auto maybe_common_arch = common_triplet.guess_architecture();
if (maybe_common_arch)
const auto maybe_common_arch = common_triplet->guess_architecture();
if (auto common_arch = maybe_common_arch.get())
{
const auto maybe_vs_prompt = guess_visual_studio_prompt_target_architecture();
if (maybe_vs_prompt)
if (auto vs_prompt = maybe_vs_prompt.get())
{
const auto common_arch = maybe_common_arch.value_or_exit(VCPKG_LINE_INFO);
const auto vs_prompt = maybe_vs_prompt.value_or_exit(VCPKG_LINE_INFO);
if (common_arch != vs_prompt)
if (*common_arch != *vs_prompt &&
!(*common_arch == CPUArchitecture::ARM64EC && *vs_prompt == CPUArchitecture::ARM64))
{
msg::println_warning(msgVcpkgInVsPrompt, msg::value = vs_prompt, msg::triplet = common_triplet);
msg::println_warning(
msgVcpkgInVsPrompt, msg::value = *vs_prompt, msg::triplet = common_triplet);
}
}
}
Expand Down

0 comments on commit 3389b4c

Please sign in to comment.