From 665fafc8ae0f3fdd6c2205b2fd0b90a9627409b6 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 8 Oct 2024 11:27:31 +0800 Subject: Update builder.lua --- xmake/rules/c++/modules/modules_support/builder.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/builder.lua') diff --git a/xmake/rules/c++/modules/modules_support/builder.lua b/xmake/rules/c++/modules/modules_support/builder.lua index 7e51ad6f8..60e1112d8 100644 --- a/xmake/rules/c++/modules/modules_support/builder.lua +++ b/xmake/rules/c++/modules/modules_support/builder.lua @@ -464,19 +464,14 @@ end -- check if dependencies changed function is_dependencies_changed(target, module) local cachekey = target:name() .. module.name - - local requires = hashset.new() - for required, _ in table.orderpairs(module.requires) do - requires:insert(required) - end - + local requires = hashset.from(table.keys(module.requires or {})) local oldrequires = compiler_support.memcache():get2(cachekey, "oldrequires") local changed = false if oldrequires then - if oldrequires ~= requires:size() then + if oldrequires ~= requires then requires_changed = true else - for _, required in requires:keys() do + for required in requires:items() do if not oldrequires:has(required) then requires_changed = true break @@ -484,6 +479,5 @@ function is_dependencies_changed(target, module) end end end - return requires, changed end -- cgit v1.3.1