summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/toolchains/ndk/load.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/toolchains/ndk/load.lua b/xmake/toolchains/ndk/load.lua
index 22b7aa658..faa22c5a0 100644
--- a/xmake/toolchains/ndk/load.lua
+++ b/xmake/toolchains/ndk/load.lua
@@ -377,8 +377,10 @@ function main(toolchain)
table.insert(rcshflags, "-l" .. link)
table.insert(rcldflags, "-l" .. link)
end
- toolchain:add("rcshflags", "-C link-args=\"" .. (table.concat(rcshflags, " "):gsub("%-march=.-%s", "") .. "\""))
- toolchain:add("rcldflags", "-C link-args=\"" .. (table.concat(rcldflags, " "):gsub("%-march=.-%s", "") .. "\""))
+ -- fix [[note: clang++: error: no such file or directory: '"-llog']] on windows
+ -- @note 'link-args=...' should not be 'link-args="..."'
+ toolchain:set("rcshflags", {"-C", "link-args=" .. (table.concat(rcshflags, " "):gsub("%-march=.-%s", ""))}, {expand=false})
+ toolchain:set("rcldflags", {"-C", "link-args=" .. (table.concat(rcldflags, " "):gsub("%-march=.-%s", ""))}, {expand=false})
local sh = toolchain:tool("sh") -- @note we cannot use `config.get("sh")`, because we need to check sh first
if sh then
toolchain:add("rcshflags", "-C linker=" .. sh)