diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-08-18 11:51:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-08-18 11:51:31 +0200 |
commit | d030838df4f5bd2dbb94ea4adc0261d21f7f6eee (patch) | |
tree | c6ee893ed7d49c7b4f670b518e620f5f114e35b4 /libbuild2/module.cxx | |
parent | 01a281bfe1c464df97e87036e361db039acf7d67 (diff) |
Fix bug in external module skipping logic
Diffstat (limited to 'libbuild2/module.cxx')
-rw-r--r-- | libbuild2/module.cxx | 12 |
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. // |