summaryrefslogtreecommitdiff
path: root/src/build.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-09-24 18:06:14 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-09-24 21:47:42 +0200
commitef7ab06044c155e4728e5e30e3262de2bb40cb29 (patch)
tree3277f3c95f36565c960c968c1bd9ec8e4d63c9e2 /src/build.cc
parentecfc610acff6a9359ae5e7f0b225c5b26b189591 (diff)
Fix re-compilation of library itself after boostrap. Add support for supplying libctor lib and include paths.
Diffstat (limited to 'src/build.cc')
-rw-r--r--src/build.cc25
1 files changed, 16 insertions, 9 deletions
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;
}
}