From b4fa2913604afba00cc09572340ce44389fb5151 Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Sun, 7 Aug 2022 12:41:58 +0200 Subject: Improve code --- xmake/rules/c++/modules/modules_support/msvc.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 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 1728d59f1..7bb9c97b5 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -459,13 +459,12 @@ end -- append .obj to final link function append_headerunits_objectfiles(target) local linker_file = _get_linker_argument_file() - for line in io.lines(linker_file) do - if target:kind() == "binary" then + if target:is_binary() then target:add("ldflags", line, {force = true}) - elseif target:kind() == "static" then + elseif target:is_static() == "static" then target:add("arflags", line, {force = true}) - elseif target:kind() == "shared" then + elseif target:is_shared() == "shared" then target:add("shflags", line, {force = true}) end end -- cgit v1.3.1