Implement VoidBuildSystem v1 (Plans 01-19) with VoidLibrary integration
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 3s
This commit is contained in:
1 parent
3cac890ce9
commit
ab64147f9d
114 files changed
+23777
-1392
No files matched your search
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Build.hpp>
|
||||
#include <Void/Build/Graph/Graph.hpp>
|
||||
#include <Void/Functional/Error.hpp>
|
||||
#include <Void/Functional/Result.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Void::Build::Config {
|
||||
|
||||
inline constexpr int kFrontendProtocolVersion = 1;
|
||||
|
||||
struct FrontendOptions {
|
||||
std::filesystem::path project_root;
|
||||
std::filesystem::path build_root;
|
||||
std::filesystem::path sdk_include_dir;
|
||||
std::filesystem::path sdk_library_path; // Optional prebuilt libVoidBuild_Sdk.a
|
||||
std::filesystem::path sdk_source_dir; // Fallback source dir if sdk_library_path absent
|
||||
std::vector<std::filesystem::path> extra_build_sources; // Explicit --build-source inputs
|
||||
std::optional<std::filesystem::path> host_compiler;
|
||||
std::chrono::milliseconds eval_timeout{std::chrono::seconds{30}};
|
||||
};
|
||||
|
||||
struct CompiledDescriptor {
|
||||
std::filesystem::path executable_path;
|
||||
std::string seed_identity_hash;
|
||||
std::vector<std::filesystem::path> config_sources;
|
||||
std::vector<std::filesystem::path> discovered_headers;
|
||||
bool recompiled{false};
|
||||
};
|
||||
|
||||
// Discovers configuration C++ sources purely from filesystem membership (works without .git!):
|
||||
// build.cpp, optional build.profiles.cpp, sorted build-support/**/*.cpp, and explicit extra
|
||||
// sources.
|
||||
[[nodiscard]] Void::Result::Result<std::vector<std::filesystem::path>, Void::Result::Error>
|
||||
discover_config_sources(const std::filesystem::path &project_root,
|
||||
const std::vector<std::filesystem::path> &extra_build_sources = {});
|
||||
|
||||
// Compiles (or reuses cached valid) host configuration descriptor executable against
|
||||
// the fixed Void::Build SDK without invoking CMake or resolving project packages.
|
||||
[[nodiscard]] Void::Result::Result<CompiledDescriptor, Void::Result::Error>
|
||||
compile_descriptor(const FrontendOptions &options);
|
||||
|
||||
// Invokes the compiled descriptor in profile-discovery mode, returning declared Profiles
|
||||
// (or default debug/release profiles if build.profiles.cpp is absent).
|
||||
[[nodiscard]] Void::Result::Result<Profiles, Void::Result::Error>
|
||||
discover_profiles(const CompiledDescriptor &descriptor, const FrontendOptions &options);
|
||||
|
||||
// Evaluates build(Project&) out-of-process for a single resolved ProfileContext using a
|
||||
// dedicated bounded result file (logs on stdout/stderr cannot corrupt protocol results).
|
||||
[[nodiscard]] Void::Result::Result<Graph::ProjectDescription, Void::Result::Error>
|
||||
evaluate_project(const CompiledDescriptor &descriptor, const ProfileContext &context,
|
||||
const FrontendOptions &options);
|
||||
|
||||
} // namespace Void::Build::Config
|
||||
Reference in new issue
Block a user