Use a specific cross_file on iOS cross compilation.

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.
This commit is contained in:
Matthieu Gautier 2020-02-21 14:33:48 +01:00
parent 7b6c79482a
commit 661eb95df0
2 changed files with 22 additions and 1 deletions

View File

@ -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 {

View File

@ -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]}'