Skip to content

Commit

Permalink
Merge pull request #6122 from star-hengxing/clang
Browse files Browse the repository at this point in the history
Fix clang flag
  • Loading branch information
waruqi authored Jan 27, 2025
2 parents 897c5ab + d600433 commit db69821
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xmake/modules/package/tools/meson.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _translate_flags(package, flags)
if package:is_plat("android") then
local flags_new = {}
for _, flag in ipairs(flags) do
if flag:startswith("-gcc-toolchain ") or flag:startswith("--target=") or flag:startswith("-isystem ") then
if flag:startswith("--gcc-toolchain=") or flag:startswith("--target=") or flag:startswith("-isystem ") then
table.join2(flags_new, flag:split(" ", {limit = 2}))
else
table.insert(flags_new, flag)
Expand Down
8 changes: 4 additions & 4 deletions xmake/toolchains/ndk/load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ function main(toolchain)
-- add gcc toolchain
local gcc_toolchain = toolchain:config("gcc_toolchain")
if gcc_toolchain then
toolchain:add("cxflags", "-gcc-toolchain " .. gcc_toolchain)
toolchain:add("asflags", "-gcc-toolchain " .. gcc_toolchain)
toolchain:add("ldflags", "-gcc-toolchain " .. gcc_toolchain)
toolchain:add("shflags", "-gcc-toolchain " .. gcc_toolchain)
toolchain:add("cxflags", "--gcc-toolchain=" .. gcc_toolchain)
toolchain:add("asflags", "--gcc-toolchain=" .. gcc_toolchain)
toolchain:add("ldflags", "--gcc-toolchain=" .. gcc_toolchain)
toolchain:add("shflags", "--gcc-toolchain=" .. gcc_toolchain)
end
else
local march = arch
Expand Down

0 comments on commit db69821

Please sign in to comment.