feat: complete Track A zero-CMake self-hosting, full VOID_TEST migration, and bit-identical Stage 2/3 bootstrap
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 2s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 2s
This commit is contained in:
1 parent
fe0d1a6483
commit
5e1916dc5c
23 files changed
+945
-141
No files matched your search
+31
-9
@@ -114,13 +114,21 @@ make_frontend_opts(const std::filesystem::path &project_root,
|
||||
opts.build_root = build_root;
|
||||
opts.sdk_include_dir = std::filesystem::path{Bootstrap::sdk_include_dir};
|
||||
opts.sdk_source_dir = std::filesystem::path{Bootstrap::sdk_source_dir};
|
||||
const auto bin_dir = std::filesystem::path{Bootstrap::binary_dir};
|
||||
const std::array<std::filesystem::path, 3> sdk_candidates{
|
||||
bin_dir / "libVoidBuild_Sdk.a",
|
||||
bin_dir / "out" / "libVoidBuildSdk.a",
|
||||
bin_dir / "profiles" / "debug" / "out" / "libVoidBuildSdk.a",
|
||||
};
|
||||
std::error_code ec;
|
||||
std::vector<std::filesystem::path> sdk_candidates;
|
||||
if (const auto self_exe = std::filesystem::read_symlink("/proc/self/exe", ec);
|
||||
!ec && !self_exe.empty()) {
|
||||
const auto self_root = self_exe.parent_path().parent_path();
|
||||
sdk_candidates.push_back(self_root / "libVoidBuildSdk.a");
|
||||
sdk_candidates.push_back(self_root / "libVoidBuild_Sdk.a");
|
||||
sdk_candidates.push_back(self_root / "lib" / "libVoidBuildSdk.a");
|
||||
}
|
||||
if (!Bootstrap::binary_dir.empty()) {
|
||||
const auto bin_dir = std::filesystem::path{Bootstrap::binary_dir};
|
||||
sdk_candidates.push_back(bin_dir / "libVoidBuild_Sdk.a");
|
||||
sdk_candidates.push_back(bin_dir / "out" / "libVoidBuildSdk.a");
|
||||
sdk_candidates.push_back(bin_dir / "profiles" / "debug" / "out" / "libVoidBuildSdk.a");
|
||||
}
|
||||
for (const auto &candidate : sdk_candidates) {
|
||||
if (std::filesystem::is_regular_file(candidate, ec)) {
|
||||
opts.sdk_library_path = candidate;
|
||||
@@ -681,7 +689,10 @@ int execute_build_or_test(BuildCmdOptions opts, bool run_tests) {
|
||||
if (effective_dep.builder.empty() &&
|
||||
effective_dep.source_kind == DependencySourceKind::Package) {
|
||||
std::error_code bec;
|
||||
if (std::filesystem::is_regular_file(mat.source_dir / "CMakeLists.txt", bec)) {
|
||||
if (std::filesystem::is_regular_file(mat.source_dir / "build.cpp", bec)) {
|
||||
effective_dep.builder = "native";
|
||||
} else if (std::filesystem::is_regular_file(mat.source_dir / "CMakeLists.txt",
|
||||
bec)) {
|
||||
effective_dep.builder = "cmake";
|
||||
} else if (std::filesystem::is_regular_file(mat.source_dir / "meson.build",
|
||||
bec)) {
|
||||
@@ -689,14 +700,21 @@ int execute_build_or_test(BuildCmdOptions opts, bool run_tests) {
|
||||
}
|
||||
}
|
||||
if (effective_dep.builder == "cmake" || effective_dep.builder == "meson" ||
|
||||
effective_dep.builder == "conan") {
|
||||
effective_dep.builder == "conan" || effective_dep.builder == "native") {
|
||||
Provider::ProviderRequest preq{effective_dep,
|
||||
mat,
|
||||
ctx,
|
||||
*tc,
|
||||
build_root / ".vbs" / "providers",
|
||||
Provider::ProviderMode::FullBuild,
|
||||
{}};
|
||||
{},
|
||||
fopts.sdk_include_dir,
|
||||
fopts.sdk_source_dir,
|
||||
fopts.sdk_library_path.empty()
|
||||
? std::nullopt
|
||||
: std::optional{fopts.sdk_library_path},
|
||||
&(*state),
|
||||
jobs};
|
||||
if (opts.native_foreign &&
|
||||
(effective_dep.builder == "cmake" || effective_dep.builder == "meson")) {
|
||||
auto tr = Provider::resolve_foreign_with_translation(
|
||||
@@ -825,11 +843,15 @@ int execute_build_or_test(BuildCmdOptions opts, bool run_tests) {
|
||||
Platform::ProcessRequest treq;
|
||||
treq.executable = t.primary_outputs.front();
|
||||
treq.working_directory = project_root;
|
||||
treq.timeout = std::chrono::seconds{300};
|
||||
auto tres = Platform::run_supervised(treq);
|
||||
if (!tres || !tres->succeeded()) {
|
||||
Void::Log::error("Test", "[{}] FAILED '{}' ({:.0f} ms)", prof_name, t.name,
|
||||
tsw.elapsed_ms());
|
||||
std::cerr << "vbs test: FAILED '" << t.name << "'\n";
|
||||
if (tres && !tres->stdout_data.empty()) {
|
||||
std::cerr << tres->stdout_data << '\n';
|
||||
}
|
||||
if (tres && !tres->stderr_data.empty()) {
|
||||
std::cerr << tres->stderr_data << '\n';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user