diff options
| author | ruki <[email protected]> | 2022-08-09 00:27:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-08 20:47:14 +0800 |
| commit | bd1263aa60a502120e06eb3fd077d69c689dc5d7 (patch) | |
| tree | d67227fd3de5875639f11174e258cd52095f6c91 /xmake/rules/c++/modules/xmake.lua | |
| parent | 3619f16ac27d39bc77a108244ab6b85f3e404c70 (diff) | |
build batchjobs modules for gcc
Diffstat (limited to 'xmake/rules/c++/modules/xmake.lua')
| -rw-r--r-- | xmake/rules/c++/modules/xmake.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua index 42c1709b4..d6098b95e 100644 --- a/xmake/rules/c++/modules/xmake.lua +++ b/xmake/rules/c++/modules/xmake.lua @@ -53,6 +53,7 @@ rule("c++.build.modules.builder") set_sourcekinds("cxx") set_extensions(".mpp", ".mxx", ".cppm", ".ixx") + -- generate headerunits -- parallel build support to accelerate `xmake build` to build headerunits before_build(function(target, batchjobs, opt) local job @@ -60,8 +61,6 @@ rule("c++.build.modules.builder") import("modules_support.common") local sourcebatch = target:sourcebatches()["c++.build.modules.builder"] common.patch_sourcebatch(target, sourcebatch, opt) - - -- generate headerunits local modules = common.get_module_dependencies(target, sourcebatch, opt) batchjobs:group_enter(target:name() .. "/generate_headerunits") common.generate_headerunits_for_batchjobs(target, batchjobs, sourcebatch, modules, opt) @@ -70,10 +69,12 @@ rule("c++.build.modules.builder") return job or opt.rootjob end, {batch = true}) + -- build modules -- parallel build support to accelerate `xmake build` to build modules before_build_files(function(target, batchjobs, sourcebatch, opt) if target:data("cxx.has_modules") then import("modules_support.common") + common.patch_sourcebatch(target, sourcebatch, opt) local modules = common.get_module_dependencies(target, sourcebatch, opt) common.build_modules_for_batchjobs(target, batchjobs, sourcebatch, modules, opt) else |
