From efe8b4c68109d6c8d09c9a98236bf9bd11164ed3 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 23 Nov 2023 00:44:05 +0800 Subject: improve to translate flags for meson #4407 --- xmake/modules/package/tools/meson.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index bfb981256..c8e07f2da 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -155,16 +155,13 @@ function _get_cross_file(package, opt) table.join2(ldflags, _get_ldflags_from_packagedeps(package, opt)) table.join2(shflags, _get_ldflags_from_packagedeps(package, opt)) if #cflags > 0 then - cflags = _translate_flags(package, cflags) file:print("c_args=['%s']", table.concat(cflags, "', '")) end if #cxxflags > 0 then - cxxflags = _translate_flags(package, cxxflags) file:print("cpp_args=['%s']", table.concat(cxxflags, "', '")) end local linkflags = table.join(ldflags or {}, shflags) if #linkflags > 0 then - linkflags = _translate_flags(package, linkflags) file:print("c_link_args=['%s']", table.concat(linkflags, "', '")) file:print("cpp_link_args=['%s']", table.concat(linkflags, "', '")) end @@ -352,7 +349,7 @@ function _get_cflags_from_packagedeps(package, opt) end end end - return result + return _translate_flags(package, result) end -- get ldflags from package deps @@ -369,7 +366,7 @@ function _get_ldflags_from_packagedeps(package, opt) end end end - return result + return _translate_flags(package, result) end -- get the build environments -- cgit v1.3.1