summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support
diff options
context:
space:
mode:
authorruki <[email protected]>2022-08-05 00:43:34 +0800
committerruki <[email protected]>2022-08-05 00:43:34 +0800
commitfc011e7ae96d00c209550022ce44f66ec002a474 (patch)
tree99e6631ff385759f7f292ccac323258af247e385 /xmake/rules/c++/modules/modules_support
parente581f5c19ad1feeed70e26d294c114c48ade00da (diff)
rename sourcebatch to headerunits
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua4
-rw-r--r--xmake/rules/c++/modules/modules_support/common.lua1
-rw-r--r--xmake/rules/c++/modules/modules_support/gcc.lua4
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc.lua4
4 files changed, 6 insertions, 7 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index b00d059b9..c53716d51 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -128,7 +128,7 @@ function generate_dependencies(target, sourcebatch, opt)
end
-- generate target header units
-function generate_headerunits(target, batchcmds, sourcebatch, opt)
+function generate_headerunits(target, batchcmds, headerunits, opt)
local compinst = target:compiler("cxx")
local cachedir = common.modules_cachedir(target)
local stlcachedir = common.stlmodules_cachedir(target)
@@ -143,7 +143,7 @@ function generate_headerunits(target, batchcmds, sourcebatch, opt)
local objectfiles = {}
local public_flags = {}
local private_flags = {}
- for _, headerunit in ipairs(sourcebatch) do
+ for _, headerunit in ipairs(headerunits) do
if not headerunit.stl then
local file = path.relative(headerunit.path, target:scriptdir())
local objectfile = target:objectfile(file)
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua
index 00f7ae6f3..331f1bea5 100644
--- a/xmake/rules/c++/modules/modules_support/common.lua
+++ b/xmake/rules/c++/modules/modules_support/common.lua
@@ -263,7 +263,6 @@ function sort_modules_by_dependencies(objectfiles, modules)
table.insert(nodes, {marked = false, tempmarked = false, objectfile = objectfile})
end
end
-
while _topological_sort_has_node_without_mark(nodes) do
local node = _topological_sort_get_first_unmarked_node(nodes)
_topological_sort_visit(node, nodes, modules, output)
diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua
index c270adcf9..afa8d249d 100644
--- a/xmake/rules/c++/modules/modules_support/gcc.lua
+++ b/xmake/rules/c++/modules/modules_support/gcc.lua
@@ -145,7 +145,7 @@ function generate_dependencies(target, sourcebatch, opt)
end
-- generate target header units
-function generate_headerunits(target, batchcmds, sourcebatch, opt)
+function generate_headerunits(target, batchcmds, headerunits, opt)
local compinst = target:compiler("cxx")
local cachedir = common.modules_cachedir(target)
local stlcachedir = common.stlmodules_cachedir(target)
@@ -153,7 +153,7 @@ function generate_headerunits(target, batchcmds, sourcebatch, opt)
-- build headerunits
local objectfiles = {}
- for _, headerunit in ipairs(sourcebatch) do
+ for _, headerunit in ipairs(headerunits) do
if not headerunit.stl then
local file = path.relative(headerunit.path, target:scriptdir())
local objectfile = target:objectfile(file)
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua
index 63e445df9..37bcf0b89 100644
--- a/xmake/rules/c++/modules/modules_support/msvc.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc.lua
@@ -110,7 +110,7 @@ function generate_dependencies(target, sourcebatch, opt)
end
-- generate target header units
-function generate_headerunits(target, batchcmds, sourcebatch, opt)
+function generate_headerunits(target, batchcmds, headerunits, opt)
local compinst = target:compiler("cxx")
local toolchain = target:toolchain("msvc")
local vcvars = toolchain:config("vcvars")
@@ -131,7 +131,7 @@ function generate_headerunits(target, batchcmds, sourcebatch, opt)
local objectfiles = {}
local public_flags = {}
local private_flags = {}
- for _, headerunit in ipairs(sourcebatch) do
+ for _, headerunit in ipairs(headerunits) do
if not headerunit.stl then
local file = path.relative(headerunit.path, target:scriptdir())
local objectfile = target:objectfile(file)