feat: adopt VoidLibrary VL-001..VL-013, self-building build.cpp, live logs, and generated CLI help
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 10s

This commit is contained in:
faumaray committed 2026-11-27 01:43:06 +03:00
1 parent ab64147f9d
commit 363fb8200e
33 files changed
+1754 -3155

No files matched your search

+24 -5
View File
@@ -565,8 +565,9 @@ lower_project_graph(const ProjectDescription &description,
graph.toolchain = toolchain;
graph.profile_identity = Toolchain::compute_profile_identity(description.profile, toolchain);
graph.project_root = canonical_root;
graph.profile_build_dir = std::filesystem::weakly_canonical(options.build_root, ec) /
"profiles" / sanitize_id_component(description.profile.name);
const auto canonical_build_root = std::filesystem::weakly_canonical(options.build_root, ec);
graph.profile_build_dir =
canonical_build_root / "profiles" / sanitize_id_component(description.profile.name);
if (options.snapshot) {
graph.snapshot_id = options.snapshot->snapshot_id;
graph.snapshot_materialized_root = options.snapshot->materialized_root;
@@ -691,9 +692,14 @@ lower_project_graph(const ProjectDescription &description,
return logical_abs;
}
if (Platform::path_is_within(canonical_root, logical_abs) &&
!Platform::path_is_within(canonical_build_root, logical_abs) &&
!Platform::path_is_within(graph.profile_build_dir, logical_abs)) {
const auto rel = logical_abs.lexically_relative(canonical_root);
return graph.snapshot_materialized_root / rel;
const auto candidate = graph.snapshot_materialized_root / rel;
std::error_code mec;
if (std::filesystem::exists(candidate, mec)) {
return candidate;
}
}
return logical_abs;
};
@@ -742,9 +748,22 @@ lower_project_graph(const ProjectDescription &description,
act.id = "custom:" + sanitize_id_component(t.name);
act.kind = ActionKind::Custom;
act.target_name = t.name;
act.executable = t.command_argv.front();
auto expand_vars = [&](std::string text) {
auto replace_all = [&](std::string_view token, const std::string &val) {
std::size_t pos = 0;
while ((pos = text.find(token, pos)) != std::string::npos) {
text.replace(pos, token.size(), val);
pos += val.size();
}
};
replace_all("$GEN", generated_root.string());
replace_all("$PROJECT_ROOT", canonical_root.string());
replace_all("$BUILD_DIR", graph.profile_build_dir.string());
return text;
};
act.executable = expand_vars(t.command_argv.front());
for (std::size_t i = 1; i < t.command_argv.size(); ++i) {
act.arguments.push_back(t.command_argv[i]);
act.arguments.push_back(expand_vars(t.command_argv[i]));
}
act.environment = t.environment;
if (!t.nondeterministic && !description.profile.nondeterministic) {