From 1ce9890cb950d516d5c1ede51264f1dcdde7356a Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 27 Dec 2022 03:15:51 +0200 Subject: [PATCH] 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. --- source/target.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 2.43.0