From 3f5b5e1cd78d0f67acae51340a03ae11192bcef6 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 27 Aug 2022 21:49:07 +0800 Subject: remove unused contains --- xmake/rules/c++/modules/modules_support/msvc.lua | 8 -------- 1 file changed, 8 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua') diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index f7dc7451c..e3c0b6fec 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -429,14 +429,6 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op deps = table.keys(module.requires), sourcefile = module.cppfile, job = batchjobs:newjob(module.cppfile, function(index, total) - function contains(t, v) - for _, flag in ipairs(t) do - if table.contains(flag, v) then - return true - end - end - return false - end -- append module mapper flags -- @note we add it at the end to ensure that the full modulemap are already stored in the mapper local requiresflags = get_requiresflags(target, module.requires) -- cgit v1.3.1 From c63f962b4369cb1d5c7ca24bfbe3031a831e9e77 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 27 Aug 2022 21:50:24 +0800 Subject: format code --- xmake/rules/c++/modules/modules_support/clang.lua | 2 +- xmake/rules/c++/modules/modules_support/common.lua | 2 +- xmake/rules/c++/modules/modules_support/msvc.lua | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua') diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index fb3a2d1fa..ea11cbe1c 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -153,7 +153,7 @@ function generate_dependencies(target, sourcebatch, opt) changed = true local dependinfo = io.readfile(jsonfile) - return { moduleinfo = dependinfo } + return {moduleinfo = dependinfo} end, {dependfile = dependfile, files = {sourcefile}}) end return changed diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index 92c92d465..0c0ee4fb7 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -553,7 +553,7 @@ end function append_dependency_objectfiles(target) local cachekey = target:name() .. "dependency_objectfiles" local cache = localcache():get(cachekey) - if cache then + if cache then if target:is_binary() then target:add("ldflags", cache, {force = true}) elseif target:is_static() then diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index e3c0b6fec..4439a578e 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -154,7 +154,7 @@ end -- generate header unit module bmi for batchjobs function generate_headerunit_for_batchjob(target, name, flags, objectfile, index, total) -- don't generate same header unit bmi at the same time across targets - if not common.memcache():get2(name, "generating") then + if not common.memcache():get2(name, "generating") then local compinst = target:compiler("cxx") local toolchain = target:toolchain("msvc") local vcvars = toolchain:config("vcvars") @@ -234,7 +234,7 @@ function generate_stl_headerunits_for_batchcmds(target, batchcmds, headerunits, local bmifile = path.join(stlcachedir, headerunit.name .. get_bmi_extension()) local objectfile = bmifile .. ".obj" local flags = { - exportheaderflag, + exportheaderflag, headernameflag .. ":angle", headerunit.name, ifcoutputflag, -- cgit v1.3.1