diff options
| author | ruki <[email protected]> | 2022-10-22 00:53:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-22 00:53:40 +0800 |
| commit | d8be2a1ca7bbc360a808eb921607fad74095f3cf (patch) | |
| tree | c5c9c84537cce87ad2ac025b5688b2d0471efc10 /xmake/modules/core/tools/armlink.lua | |
| parent | b2d842ab8de497bc5c0949d013adbc03e047e3d9 (diff) | |
fix armlink for long path #2952
Diffstat (limited to 'xmake/modules/core/tools/armlink.lua')
| -rw-r--r-- | xmake/modules/core/tools/armlink.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/armlink.lua b/xmake/modules/core/tools/armlink.lua index e25a81967..fa8a1510f 100644 --- a/xmake/modules/core/tools/armlink.lua +++ b/xmake/modules/core/tools/armlink.lua @@ -49,8 +49,17 @@ function nf_runtime(self, runtime) end -- make the link arguments list -function linkargv(self, objectfiles, targetkind, targetfile, flags) - return self:program(), table.join("-o", targetfile, objectfiles, flags) +function linkargv(self, objectfiles, targetkind, targetfile, flags, opt) + opt = opt or {} + local argv = table.join("-o", targetfile, objectfiles, flags) + if is_host("windows") and not opt.rawargs then + argv = winos.cmdargv(argv, {escape = true}) + if #argv > 0 and argv[1] and argv[1]:startswith("@") then + argv[1] = argv[1]:replace("@", "", {plain = true}) + table.insert(argv, 1, "--via") + end + end + return self:program(), argv end -- link the target file |
