From e40e8ba4cb7c7b83fa9ef1a5fbdffe7708a8de02 Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Wed, 3 Aug 2022 03:30:03 +0200 Subject: [C++20 Modules] Restore removed comments --- xmake/rules/c++/modules/xmake.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xmake/rules/c++/modules/xmake.lua') diff --git a/xmake/rules/c++/modules/xmake.lua b/xmake/rules/c++/modules/xmake.lua index 233fcab9f..be87a7eb0 100644 --- a/xmake/rules/c++/modules/xmake.lua +++ b/xmake/rules/c++/modules/xmake.lua @@ -26,6 +26,9 @@ rule("c++.build.modules") add_deps("c++.build.modules.install") on_config(function (target) + -- we disable to build across targets in parallel, because the source files may depend on other target modules + -- @see https://github.com/xmake-io/xmake/issues/1858 + function contains_modules(target) local target_with_modules for _, dep in ipairs(target:orderdeps()) do @@ -40,8 +43,10 @@ rule("c++.build.modules") local target_with_modules = target:sourcebatches()["c++.build.modules"] and contains_modules(target) or false if target_with_modules then - -- we disable to build across targets in parallel, because the source files may depend on other target modules - -- @see https://github.com/xmake-io/xmake/issues/1858 + -- @note this will cause cross-parallel builds to be disabled for all sub-dependent targets, + -- even if some sub-targets do not contain C++ modules. + -- + -- maybe we will have a more fine-grained configuration strategy to disable it in the future. target:set("policy", "build.across_targets_in_parallel", false) local common = import("modules_support.common") -- cgit v1.3.1