feat(toolchain): cross-compile Windows targets with MinGW and run tests under Wine
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s

This commit is contained in:
faumaray committed 2026-12-05 04:47:18 +03:00
1 parent 70483492aa
commit a808596462
8 files changed
+157 -31

No files matched your search

+10 -4
View File
@@ -8,6 +8,7 @@
#include <Void/Data/StrictJson.hpp>
#include <Void/System/Path.hpp>
#include <Void/System/Types.hpp>
#include <Void/Text/Str.hpp>
#include <algorithm>
#include <format>
@@ -488,9 +489,9 @@ expand_glob(const std::filesystem::path &project_root, std::string_view pattern)
if (raw_pattern.is_absolute()) {
const auto rel_pattern = raw_pattern.lexically_relative(canonical_root);
if (!rel_pattern.empty() && rel_pattern.native().starts_with("..")) {
return std::unexpected{make_error(
std::format("expand_glob: pattern '{}' escapes project root '{}'", pattern,
canonical_root.string()))};
return std::unexpected{
make_error(std::format("expand_glob: pattern '{}' escapes project root '{}'",
pattern, canonical_root.string()))};
}
effective_pattern = rel_pattern.lexically_normal().generic_string();
}
@@ -2024,8 +2025,13 @@ lower_project_graph(const ProjectDescription &description,
graph.actions.push_back(std::move(act));
} else if (t.kind == TargetKind::Executable || t.kind == TargetKind::SharedLibrary ||
t.kind == TargetKind::Test) {
// Windows targets use PE conventions (.exe executables, .dll shared libraries).
const bool windows_target =
Void::Str::to_lower_ascii(description.profile.os) == "windows";
const auto out_name =
(t.kind == TargetKind::SharedLibrary) ? ("lib" + t.name + ".so") : t.name;
(t.kind == TargetKind::SharedLibrary)
? (windows_target ? (t.name + ".dll") : ("lib" + t.name + ".so"))
: (windows_target ? (t.name + ".exe") : t.name);
const auto bin_path =
(t.kind == TargetKind::SharedLibrary ? artifacts_root : (artifacts_root / "bin")) /
out_name;