summaryrefslogtreecommitdiff
path: root/src/tasks.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-11-21 21:09:42 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2021-11-21 21:09:42 +0100
commit0855b2177b62fa719eff6643e3b433c41eecf142 (patch)
tree4d2e2166bb206f9f232f828a23d743d601f20f3a /src/tasks.cc
parenta7869c0bd65faacdd008284df9ab07de7df3d445 (diff)
Don't warn about missing external config cache values when bootstrapping.
Diffstat (limited to 'src/tasks.cc')
-rw-r--r--src/tasks.cc55
1 files changed, 30 insertions, 25 deletions
diff --git a/src/tasks.cc b/src/tasks.cc
index 3bfff8b..8ab296f 100644
--- a/src/tasks.cc
+++ b/src/tasks.cc
@@ -18,7 +18,8 @@
#include "rebuild.h"
#include "configure.h"
-const std::deque<Target>& getTargets(const Settings& settings)
+const std::deque<Target>& getTargets(const Settings& settings,
+ bool resolve_externals)
{
static bool initialised{false};
static std::deque<Target> targets;
@@ -36,31 +37,34 @@ const std::deque<Target>& getTargets(const Settings& settings)
auto configs = configFiles[i].cb();
for(auto& config : configs)
{
- // Resolv config externals
- for(const auto& external : config.externals)
+ if(resolve_externals)
{
- if(externals.find(external) == externals.end())
+ // Resolv config externals
+ for(const auto& external : config.externals)
{
- std::cout << "External '" << external <<
- "' not found cache - run configure.\n";
- continue;
+ if(externals.find(external) == externals.end())
+ {
+ std::cout << "External '" << external <<
+ "' not found in cache - run configure.\n";
+ exit(1);
+ }
+ const auto& flags = externals.at(external);
+ config.flags.cflags.insert(config.flags.cflags.end(),
+ flags.cflags.begin(),
+ flags.cflags.end());
+ config.flags.cxxflags.insert(config.flags.cxxflags.end(),
+ flags.cxxflags.begin(),
+ flags.cxxflags.end());
+ config.flags.ldflags.insert(config.flags.ldflags.end(),
+ flags.ldflags.begin(),
+ flags.ldflags.end());
+ config.flags.asmflags.insert(config.flags.asmflags.end(),
+ flags.asmflags.begin(),
+ flags.asmflags.end());
+ //config.libs.insert(config.libs.end(),
+ // libs.begin(),
+ // libs.end());
}
- const auto& flags = externals.at(external);
- config.flags.cflags.insert(config.flags.cflags.end(),
- flags.cflags.begin(),
- flags.cflags.end());
- config.flags.cxxflags.insert(config.flags.cxxflags.end(),
- flags.cxxflags.begin(),
- flags.cxxflags.end());
- config.flags.ldflags.insert(config.flags.ldflags.end(),
- flags.ldflags.begin(),
- flags.ldflags.end());
- config.flags.asmflags.insert(config.flags.asmflags.end(),
- flags.asmflags.begin(),
- flags.asmflags.end());
- //config.libs.insert(config.libs.end(),
- // libs.begin(),
- // libs.end());
}
targets.push_back({config, path});
@@ -169,9 +173,10 @@ std::shared_ptr<Task> getNextTask(const std::list<std::shared_ptr<Task>>& allTas
}
std::list<std::shared_ptr<Task>> getTasks(const Settings& settings,
- const std::vector<std::string> names)
+ const std::vector<std::string> names,
+ bool resolve_externals)
{
- auto& targets = getTargets(settings);
+ auto& targets = getTargets(settings, resolve_externals);
std::list<std::shared_ptr<Task>> tasks;
for(const auto& target : targets)
{