[vcpkg] Add support for muslc, static crt linkage, and forcing the system binaries for cmake and ninja
MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
@@ -171,8 +171,10 @@ static void inner(const VcpkgCmdArguments& args)
default_triplet = Triplet::from_canonical_name("x64-osx");
#elif defined(__FreeBSD__)
default_triplet = Triplet::from_canonical_name("x64-freebsd");
-#else
+#elif defined(__GLIBC__)
default_triplet = Triplet::from_canonical_name("x64-linux");
+#else
+ default_triplet = Triplet::from_canonical_name("x64-linux-musl");
#endif
}
}

MODIFY
src/vcpkg/tools.cpp
src/vcpkg/tools.cpp
@@ -253,6 +253,11 @@ namespace vcpkg
static PathAndVersion get_path(const VcpkgPaths& paths)
{
+ if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value())
+ {
+ return {"cmake", "0"};
+ }
+
std::vector<fs::path> candidate_paths;
#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__)
static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake");
@@ -317,6 +322,11 @@ namespace vcpkg
static PathAndVersion get_path(const VcpkgPaths& paths)
{
+ if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value())
+ {
+ return {"ninja", "0"};
+ }
+
static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja");
std::vector<fs::path> candidate_paths;

[vcpkg] Add support for muslc, static crt linkage, and forcing the system binaries for cmake and ninja