diff options
| author | ruki <[email protected]> | 2024-10-08 11:32:00 +0800 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-10-08 13:47:46 +0200 |
| commit | 921b651c56f25817a4fbac8359497e5bb12375f1 (patch) | |
| tree | 37993d09ffc787a3e230040492d742b0841c3f8a | |
| parent | 665fafc8ae0f3fdd6c2205b2fd0b90a9627409b6 (diff) | |
Update builder.lua
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc/builder.lua | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/rules/c++/modules/modules_support/msvc/builder.lua b/xmake/rules/c++/modules/modules_support/msvc/builder.lua index bb7090cb4..5998db62f 100644 --- a/xmake/rules/c++/modules/modules_support/msvc/builder.lua +++ b/xmake/rules/c++/modules/modules_support/msvc/builder.lua @@ -173,7 +173,7 @@ function _get_requiresflags(target, module, opt) local requiresflags = compiler_support.memcache():get2(cachekey, "requiresflags") if not requiresflags or requires_changed then local deps_flags = {} - for required, _ in requires:orderkeys() do + for required in requires:orderitems() do local dep_module = get_from_target_mapper(target, required) assert(dep_module, "module dependency %s required for %s not found <%s>", required, name, target:name()) @@ -204,8 +204,8 @@ function _get_requiresflags(target, module, opt) requiresflags = {} local contains = {} for _, map in ipairs(deps_flags) do - local name, _ = map[2]:split("=")[1], map[2]:split("=")[2] - if not contains[name] then + local name = map[2]:split("=")[1] + if name and not contains[name] then table.insert(requiresflags, map) contains[name] = true end @@ -414,4 +414,3 @@ function make_headerunit_buildcmds(target, batchcmds, headerunit, bmifile, outpu batchcmds:add_depfiles(headerunit.path) return os.mtime(bmifile) end - |
