Skip to content

Commit

Permalink
Allow duplicate -arch options.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Apr 12, 2024
1 parent 02a8d22 commit 586a69c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sw/client/common/sw_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,14 @@ std::vector<sw::TargetSettings> SwClientContext::createSettings()
}
}

auto sort_and_unique = [](auto &v) {
std::ranges::sort(v);
auto last = std::unique(v.begin(), v.end());
v.erase(last, v.end());
};

// platform
sort_and_unique(options.platform);
mult_and_action(options.platform.size(), [&options](auto &s, int i)
{
s["os"]["arch"] = archTypeFromStringCaseI(options.platform[i]);
Expand Down

0 comments on commit 586a69c

Please sign in to comment.