summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support
diff options
context:
space:
mode:
authorruki <[email protected]>2023-08-27 07:16:46 +0800
committerGitHub <[email protected]>2023-08-27 07:16:46 +0800
commite255c709d260481ee7def19c95a8d53795c6e828 (patch)
tree4457fbfc6e0bc4a6ddb0efe8b6a2e9ea43a065d7 /xmake/rules/c++/modules/modules_support
parente7bc61a8c4fd578350c3867865f3019c72d12603 (diff)
parentea085bb8726bcbf6ce1fe4a1bd36b953f083e4a0 (diff)
Merge pull request #4126 from Arthapz/dev
[Modules C++20] try to fix headerunits on msvc
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua
index 393c38904..0372ca997 100644
--- a/xmake/rules/c++/modules/modules_support/msvc.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc.lua
@@ -350,10 +350,9 @@ function generate_user_headerunits_for_batchjobs(target, batchjobs, headerunits,
outputdir,
"/Fo" .. objectfile
}
- generate_headerunit_for_batchjob(target, headerunit.unique and path.filename(headerunit.name) or headerunit.name, flags, objectfile, index, total)
-
+ generate_headerunit_for_batchjob(target, headerunit.name, flags, objectfile, index, total)
end, {dependfile = target:dependfile(bmifile), files = {headerunit.path}})
- _add_module_to_mapper(target, headerunitflag .. headerunit.type, headerunit.name, headerunit.type == ":quote" and headerunit.path or headerunit.name, objectfile, bmifile)
+ _add_module_to_mapper(target, headerunitflag, headerunit.name, headerunit.path, objectfile, bmifile)
end, {rootjob = flushjob})
end
end
@@ -386,10 +385,10 @@ function generate_user_headerunits_for_batchcmds(target, batchcmds, headerunits,
outputdir,
"/Fo" .. objectfile
}
- generate_headerunit_for_batchcmds(target, headerunit.unique and path.filename(headerunit.name) or headerunit.name, flags, objectfile, batchcmds, opt)
+ generate_headerunit_for_batchcmds(target, headerunit.name, flags, objectfile, batchcmds, opt)
batchcmds:add_depfiles(headerunit.path)
- _add_module_to_mapper(target, headerunitflag .. headerunit.type, headerunit.name, headerunit.type == ":quote" and headerunit.path or headerunit.name, objectfile, bmifile)
+ _add_module_to_mapper(target, headerunitflag, headerunit.name, headerunit.path, objectfile, bmifile)
depmtime = math.max(depmtime, os.mtime(bmifile))
end