From ef7ab06044c155e4728e5e30e3262de2bb40cb29 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 24 Sep 2021 18:06:14 +0200 Subject: Fix re-compilation of library itself after boostrap. Add support for supplying libctor lib and include paths. --- src/build.cc | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/build.cc') diff --git a/src/build.cc b/src/build.cc index 1b70c5b..425ccd3 100644 --- a/src/build.cc +++ b/src/build.cc @@ -78,16 +78,19 @@ int build(const Settings& settings, process != processes.end(); ++process) { - if(process->valid()) + if(process->valid() == false) { - if(process->get() != 0) - { - // TODO: Wait for other processes to finish before returning - return 1; - } - processes.erase(process); - break; + continue; + } + + auto ret = process->get(); + if(ret != 0) + { + // NOTE Wait for other processes to finish before returning + return ret; } + processes.erase(process); + break; } if(started_one) @@ -104,11 +107,15 @@ int build(const Settings& settings, process != processes.end(); ++process) { + if(process->valid() == false) + { + continue; + } process->wait(); auto ret = process->get(); if(ret != 0) { - return 1; + return ret; } } -- cgit v1.2.3