diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-09-22 11:28:53 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-09-22 11:28:53 +0200 |
commit | d06e8d1d3b0594c74fa444da76c3c7925ed58f70 (patch) | |
tree | a2c6d46e285b8109adc53a7ee2562cd26126a399 /libbuild2/file.cxx | |
parent | 9f72ad00a0654bc965ff527615e02fd35596073c (diff) |
Add ability to skip external modules during bootstrap (--no-external-modules)
Diffstat (limited to 'libbuild2/file.cxx')
-rw-r--r-- | libbuild2/file.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index 2660b9e..67aeb77 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -1431,6 +1431,8 @@ namespace build2 { tracer trace ("load_root"); + context& ctx (root.ctx); + const dir_path& out_root (root.out_path ()); const dir_path& src_root (root.src_path ()); @@ -1442,6 +1444,10 @@ namespace build2 if (root.buildfiles.find (f) != root.buildfiles.end ()) return; + if (ctx.no_external_modules) + fail << "attempt to load project " << root << " after skipped loading " + << "external modules"; + // First load outer roots, if any. // if (scope* rs = root.parent_scope ()->root_scope ()) @@ -1483,7 +1489,7 @@ namespace build2 // Reuse the parser to accumulate the configuration variable information. // - parser p (root.ctx, load_stage::root); + parser p (ctx, load_stage::root); if (he) {source_hooks (p, root, hd, true /* pre */); p.reset ();} if (fe) {source_once (p, root, root, f, root);} |