aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-08-18 11:51:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-08-18 11:51:31 +0200
commitd030838df4f5bd2dbb94ea4adc0261d21f7f6eee (patch)
treec6ee893ed7d49c7b4f670b518e620f5f114e35b4 /libbuild2/module.cxx
parent01a281bfe1c464df97e87036e361db039acf7d67 (diff)
Fix bug in external module skipping logic
Diffstat (limited to 'libbuild2/module.cxx')
-rw-r--r--libbuild2/module.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx
index b31aa9c..9756860 100644
--- a/libbuild2/module.cxx
+++ b/libbuild2/module.cxx
@@ -591,17 +591,15 @@ namespace build2
<< mmod;
}
else
- {
- // Reduce skipped external module to optional.
- //
- if (boot)
- opt = true;
-
i = loaded_modules.emplace (move (mmod), nullptr).first;
- }
}
}
+ // Reduce skipped external module to optional.
+ //
+ if (boot && i->second == nullptr)
+ opt = true;
+
// Now the iterator points to a submodule or to the main module, the
// latter potentially NULL.
//