From: Mikko Rasa Date: Tue, 27 Dec 2022 01:15:51 +0000 (+0200) Subject: Prepare early dependencies of a target before finding more X-Git-Url: http://git.tdb.fi/?p=builder.git;a=commitdiff_plain;h=1ce9890cb950d516d5c1ede51264f1dcdde7356a Prepare early dependencies of a target before finding more AndroidCompiler supplies build information for the C++ standard library, which is consumed by Binary through ObjectFiles. The compiler needs to be prepared before Binary is, or the C++ stdlib won't be found. --- diff --git a/source/target.cpp b/source/target.cpp index d701859..dbdd950 100644 --- a/source/target.cpp +++ b/source/target.cpp @@ -122,6 +122,10 @@ void Target::prepare() } state = PREPARING; + /* Prepare existing dependencies early, because their information may be + needed to find other dependencies. */ + for(Target *d: depends) + d->prepare(); if(tool) tool->prepare(); @@ -140,6 +144,8 @@ void Target::prepare() broken |= (component && !component->get_problems().empty()); } + /* Now that all dependencies are known, prepare them again. This will do + nothing to already prepared targets. */ for(Target *d: depends) { d->prepare();