diff options
author | Ole André Vadla RavnÄs <oleavr@gmail.com> | 2017-05-22 00:53:41 +0200 |
---|---|---|
committer | Ole André Vadla RavnÄs <oleavr@gmail.com> | 2017-05-29 21:05:57 +0200 |
commit | b32c757073c3227a05d770ec56d953f5aac663d0 (patch) | |
tree | 8e0fcabd9a4e69d02cf486842ee7b9d8314f63b5 /mesonbuild/environment.py | |
parent | 0f85d9f66d85a6cca7e57dba6a9590a3bdbac57d (diff) | |
download | meson-b32c757073c3227a05d770ec56d953f5aac663d0.zip meson-b32c757073c3227a05d770ec56d953f5aac663d0.tar.gz meson-b32c757073c3227a05d770ec56d953f5aac663d0.tar.bz2 |
environment: Add needs_exe_wrapper for overriding auto-detection.
This is useful when build_machine appears to be compatible with
host_machine, but actually isn't. For example when:
- build_machine is macOS and host_machine is the iOS Simulator
- the build_machine's libc is glibc but the host_machine libc is uClibc
- code relies on kernel features not available on the build_machine
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index bf58472..d07bb1d 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -906,6 +906,9 @@ class CrossBuildInfo: return 'host_machine' in self.config def need_exe_wrapper(self): + value = self.config['properties'].get('needs_exe_wrapper', None) + if value is not None: + return value # Can almost always run 32-bit binaries on 64-bit natively if the host # and build systems are the same. We don't pass any compilers to # detect_cpu_family() here because we always want to know the OS |