diff options
| author | ruki <[email protected]> | 2023-03-23 22:31:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-03-23 22:31:18 +0800 |
| commit | c5e99072000ccf3e7706778590d37acc6531ccd2 (patch) | |
| tree | a6dc07c7d3328608975b83ebbfb40126e95fc7ab | |
| parent | 5d67fefb631370d9cdefffd2626fa1cfe06fb98e (diff) | |
improve parse deps for armcc #3545
| -rw-r--r-- | xmake/modules/private/tools/armcc/parse_deps.lua | 19 |
1 files 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 |
