diff options
| author | ruki <[email protected]> | 2022-09-16 23:14:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-16 23:14:50 +0800 |
| commit | c0399838f76851f5b63a6ce1639fc84e6d58189b (patch) | |
| tree | f9779f0362d25b1a8788ba6294b89c1985f961b2 | |
| parent | ee6622a6f3b48ab4af7aa26f4d788dde25b705a8 (diff) | |
improve cross file for ios
| -rw-r--r-- | xmake/modules/package/tools/meson.lua | 9 | ||||
| -rw-r--r-- | xmake/modules/private/action/trybuild/meson.lua | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/xmake/modules/package/tools/meson.lua b/xmake/modules/package/tools/meson.lua index 9657a8e10..38f31d00a 100644 --- a/xmake/modules/package/tools/meson.lua +++ b/xmake/modules/package/tools/meson.lua @@ -82,19 +82,20 @@ function _get_cross_file(package, opt) file:print("[binaries]") local cc = package:build_getenv("cc") if cc then - file:print("c='%s'", cc) + -- we need split it, maybe is `xcrun -sdk iphoneos clang` + file:print("c=['%s']", table.concat(os.argv(cc), "', '")) end local cxx = package:build_getenv("cxx") if cxx then - file:print("cpp='%s'", cxx) + file:print("cpp=['%s']", table.concat(os.argv(cxx), "', '")) end local ld = package:build_getenv("ld") if ld then - file:print("ld='%s'", ld) + file:print("ld=['%s']", table.concat(os.argv(ld), "', '")) end local ar = package:build_getenv("ar") if ar then - file:print("ar='%s'", ar) + file:print("ar=['%s']", table.concat(os.argv(ar), "', '")) end local strip = package:build_getenv("strip") if strip then diff --git a/xmake/modules/private/action/trybuild/meson.lua b/xmake/modules/private/action/trybuild/meson.lua index 822f72e00..6e9cf02ca 100644 --- a/xmake/modules/private/action/trybuild/meson.lua +++ b/xmake/modules/private/action/trybuild/meson.lua @@ -81,19 +81,20 @@ function _get_cross_file(buildir) file:print("[binaries]") local cc = _get_buildenv("cc") if cc then - file:print("c='%s'", cc) + -- we need split it, maybe is `xcrun -sdk iphoneos clang` + file:print("c=['%s']", table.concat(os.argv(cc), "', '")) end local cxx = _get_buildenv("cxx") if cxx then - file:print("cpp='%s'", cxx) + file:print("cpp=['%s']", table.concat(os.argv(cxx), "', '")) end local ld = _get_buildenv("ld") if ld then - file:print("ld='%s'", ld) + file:print("ld=['%s']", table.concat(os.argv(ld), "', '")) end local ar = _get_buildenv("ar") if ar then - file:print("ar='%s'", ar) + file:print("ar=['%s']", table.concat(os.argv(ar), "', '")) end local strip = _get_buildenv("strip") if strip then |
