From 661eb95df016e1d44e1e528cc19c04d08e04e072 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 21 Feb 2020 14:33:48 +0100 Subject: [PATCH] =?UTF-8?q?Use=20a=20specific=20cross=5Ffile=20on=20iOS?= =?UTF-8?q?=C2=A0cross=20compilation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to set the property `needs_exe_wrapper` to true for x86_64 cross compilation. Else, meson will try to detect if we could run the cross compiled executable, and because it is the same arch, it will assume we can. So it will try to sanity check and execute the cross compiled binary. Then fails. --- kiwixbuild/platforms/ios.py | 2 +- kiwixbuild/templates/meson_ios_cross_file.txt | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 kiwixbuild/templates/meson_ios_cross_file.txt diff --git a/kiwixbuild/platforms/ios.py b/kiwixbuild/platforms/ios.py index 8dc217b..2fc379b 100644 --- a/kiwixbuild/platforms/ios.py +++ b/kiwixbuild/platforms/ios.py @@ -28,7 +28,7 @@ class iOSPlatformInfo(PlatformInfo): def finalize_setup(self): super().finalize_setup() self.buildEnv.cmake_crossfile = self._gen_crossfile('cmake_ios_cross_file.txt') - self.buildEnv.meson_crossfile = self._gen_crossfile('meson_cross_file.txt') + self.buildEnv.meson_crossfile = self._gen_crossfile('meson_ios_cross_file.txt') def get_cross_config(self): return { diff --git a/kiwixbuild/templates/meson_ios_cross_file.txt b/kiwixbuild/templates/meson_ios_cross_file.txt new file mode 100644 index 0000000..e7f417f --- /dev/null +++ b/kiwixbuild/templates/meson_ios_cross_file.txt @@ -0,0 +1,21 @@ +[binaries] +pkgconfig = '{binaries[PKGCONFIG]}' +c = '{binaries[CC]}' +ar = '{binaries[AR]}' +cpp = '{binaries[CXX]}' +strip = '{binaries[STRIP]}' +ranlib = '{binaries[RANLIB]}' +{exe_wrapper_def} + +[properties] +c_link_args = {extra_libs!r} +cpp_link_args = {extra_libs!r} +c_args = {extra_cflags!r} +cpp_args = {extra_cflags!r} +needs_exe_wrapper = true + +[host_machine] +cpu_family = '{host_machine[cpu_family]}' +cpu = '{host_machine[cpu]}' +system = '{host_machine[lsystem]}' +endian = '{host_machine[endian]}'