summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-12-13 18:40:51 +0100
committerArthur LAURENT <[email protected]>2022-12-13 18:40:51 +0100
commitf8d5eba57c7252f504a6782d3a7bf9ddd6cae74c (patch)
tree9188bbeed0c431b35696737722e070a770ff7979
parentd0f88a03ac9aa31df054cf3b91b660c1e696dcaa (diff)
fix module objectfile handling
-rw-r--r--xmake/rules/c++/modules/modules_support/msvc.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua
index bd645c694..31b65b154 100644
--- a/xmake/rules/c++/modules/modules_support/msvc.lua
+++ b/xmake/rules/c++/modules/modules_support/msvc.lua
@@ -79,7 +79,7 @@ function _add_objectfile_to_link_arguments(target, objectfile)
if table.contains(cache, objectfile) then
return
end
- table.insert(cache, path.translate(objectfile))
+ table.insert(cache, objectfile)
common.localcache():set(cachekey, cache)
common.localcache():save(cachekey)
end
@@ -519,7 +519,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op
name = name or module.cppfile,
flags = _flags,
progress = (index * 100) / total})
- _add_objectfile_to_link_arguments(target, objectfile)
+ _add_objectfile_to_link_arguments(target, path(objectfile))
elseif requiresflags then
requiresflags = get_requiresflags(target, module.requires)
target:fileconfig_add(cppfile, {force = {cxxflags = table.join(flags, requiresflags)}})
@@ -584,7 +584,7 @@ function build_modules_for_batchcmds(target, batchcmds, objectfiles, modules, op
batchcmds:mkdir(path.directory(objectfile))
batchcmds:vrunv(compinst:program(), table.join(compinst:compflags({target = target}), table.join(flags, requiresflags or {})), {envs = msvc:runenvs()})
batchcmds:add_depfiles(cppfile)
- _add_objectfile_to_link_arguments(target, objectfile)
+ _add_objectfile_to_link_arguments(target, path(objectfile))
if provide then
_add_module_to_mapper(target, referenceflag, name, name, objectfile, provide.bmi, requiresflags)
end