From c5e99072000ccf3e7706778590d37acc6531ccd2 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 23 Mar 2023 22:31:18 +0800 Subject: improve parse deps for armcc #3545 --- xmake/modules/private/tools/armcc/parse_deps.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/xmake/modules/private/tools/armcc/parse_deps.lua b/xmake/modules/private/tools/armcc/parse_deps.lua index b4cfb7833..afde0a575 100644 --- a/xmake/modules/private/tools/armcc/parse_deps.lua +++ b/xmake/modules/private/tools/armcc/parse_deps.lua @@ -52,7 +52,6 @@ end -- -- function main(depsdata) - local block = 0 local results = hashset.new() local projectdir = os.projectdir() @@ -64,12 +63,18 @@ function main(depsdata) includefile = includefile:replace("\\:", ":", plain) end includefile = includefile:replace(space_placeholder, ' ', plain) - includefile = includefile:split(".o:", {plain = true})[2] - includefile = includefile:replace(' ', '', plain) - if #includefile > 0 then - includefile = _normailize_dep(includefile, projectdir) - if includefile then - results:insert(includefile) + local splitinfo = includefile:split(".o:", {plain = true}) + if #splitinfo < 2 then + splitinfo = includefile:split(".obj:", {plain = true}) + end + includefile = splitinfo[2] + if includefile then + includefile = includefile:replace(' ', '', plain) + if #includefile > 0 then + includefile = _normailize_dep(includefile, projectdir) + if includefile then + results:insert(includefile) + end end end end -- cgit v1.3.1