diff options
| author | ruki <[email protected]> | 2025-04-12 10:16:48 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-12 10:16:48 +0800 |
| commit | 7cfbacd71f14c897e2749c0b931f9ff48a768744 (patch) | |
| tree | 37a65113ad7da1a81e6d95b2d06a73e2a749ad0e /xmake/rules/c++/modules/modules_support/builder.lua | |
| parent | 4d20b980c0d3826641a7b0481145a5e495417f6e (diff) | |
| parent | c8e24bdbe3cc00955c8078412ef2104e625937a8 (diff) | |
Merge pull request #6315 from xmake-io/pch
Improve modules with pch
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/builder.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/builder.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xmake/rules/c++/modules/modules_support/builder.lua b/xmake/rules/c++/modules/modules_support/builder.lua index 7ec120cc9..a02e1e7d3 100644 --- a/xmake/rules/c++/modules/modules_support/builder.lua +++ b/xmake/rules/c++/modules/modules_support/builder.lua @@ -48,8 +48,9 @@ function _build_modules(target, sourcebatch, modules, opt) -- we need to use the full path as dep name if requre item is headerunit local dep = name if req.method:startswith("include-") and req.path then - dep = path.normalize(req.path) + dep = req.path end + dep = path.normalize(dep) local depname = target:fullname() .. "/module/" .. dep table.insert(deps, depname) end @@ -279,7 +280,7 @@ function build_modules_for_batchjobs(target, batchjobs, sourcebatch, modules, op -- add module jobs _build_modules(target, sourcebatch, modules, table.join(opt, { build_module = function(deps, module, name, objectfile, cppfile) - local job_name = target:fullname() .. "/module/" .. (name or cppfile) + local job_name = target:fullname() .. "/module/" .. path.normalize(name or cppfile) modulesjobs[job_name] = _builder(target).make_module_buildjobs(target, batchjobs, job_name, deps, {module = module, objectfile = objectfile, cppfile = cppfile}) end @@ -306,7 +307,7 @@ function build_modules_for_jobgraph(target, jobgraph, sourcebatch, modules, opt) -- add module jobs _build_modules(target, sourcebatch, modules, table.join(opt, { build_module = function(deps, module, name, objectfile, cppfile) - local jobname = target:fullname() .. "/module/" .. (name or cppfile) + local jobname = target:fullname() .. "/module/" .. path.normalize(name or cppfile) _builder(target).make_module_jobgraph(target, jobgraph, { module = module, objectfile = objectfile, cppfile = cppfile }) @@ -355,7 +356,7 @@ function build_headerunits_for_batchjobs(target, batchjobs, sourcebatch, modules local modulesjobs = {} _build_headerunits(target, headerunits, table.join(opt, { build_headerunit = function(headerunit, key, bmifile, outputdir, build) - local job_name = target:fullname() .. "/module/" .. key + local job_name = target:fullname() .. "/module/" .. path.normalize(key) local job = _builder(target).make_headerunit_buildjobs(target, job_name, batchjobs, headerunit, bmifile, outputdir, table.join(opt, {build = build})) if job then modulesjobs[job_name] = job @@ -392,7 +393,7 @@ function build_headerunits_for_jobgraph(target, jobgraph, sourcebatch, modules, local modulesjobs = {} _build_headerunits(target, headerunits, table.join(opt, { build_headerunit = function(headerunit, key, bmifile, outputdir, build) - local job_name = target:fullname() .. "/module/" .. key + local job_name = target:fullname() .. "/module/" .. path.normalize(key) _builder(target).make_headerunit_jobgraph(target, job_name, jobgraph, headerunit, bmifile, outputdir, table.join(opt, {build = build})) end |
