mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-04 08:23:38 +02:00
meson: Use meson.can_run_host_binaries()
It is not only shorter than `not meson.is_cross_build() or meson.has_exe_wrapper()` but also handle the case of cross compiling to a compatible arch such as building for i386 on an amd64.
This commit is contained in:
committed by
Philip Withnall
parent
25ab87d8e5
commit
374be41433
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
if not os.environ.get("DESTDIR"):
|
||||
print("GIO module cache creation...")
|
||||
subprocess.call([sys.argv[1], sys.argv[2]])
|
@@ -978,7 +978,7 @@ glib_compile_resources = executable('glib-compile-resources',
|
||||
# Cannot override those programs in cross compilation case because they are
|
||||
# native executables that cannot be run on the build machine.
|
||||
# See https://gitlab.gnome.org/GNOME/glib/issues/1859.
|
||||
if not meson.is_cross_build()
|
||||
if not meson.can_run_host_binaries()
|
||||
meson.override_find_program('glib-compile-schemas', glib_compile_schemas)
|
||||
meson.override_find_program('glib-compile-resources', glib_compile_resources)
|
||||
meson.override_find_program('gio-querymodules', gio_querymodules)
|
||||
|
@@ -603,7 +603,7 @@ if installed_tests_enabled
|
||||
endforeach
|
||||
endif
|
||||
|
||||
if not meson.is_cross_build() or meson.has_exe_wrapper()
|
||||
if meson.can_run_host_binaries()
|
||||
|
||||
compiler_type = '--compiler=@0@'.format(cc.get_id())
|
||||
|
||||
|
Reference in New Issue
Block a user