diff --git a/lib/gadget/meson.build b/lib/gadget/meson.build index 355844875..a7e8c92de 100644 --- a/lib/gadget/meson.build +++ b/lib/gadget/meson.build @@ -88,7 +88,7 @@ elif host_os in ['ios', 'tvos'] else identity = gadget_name endif -gadget = custom_target('frida-gadget', +gadget_for_host_arch = custom_target('frida-gadget', input: modulated_gadget, output: need_universal_gadget ? f'@gadget_name@-@host_abi@' : gadget_name, command: post_process + ['shared-library', identity], @@ -97,8 +97,8 @@ gadget = custom_target('frida-gadget', ) if need_universal_gadget - custom_target('frida-gadget-universal', - input: gadget, + gadget = custom_target('frida-gadget-universal', + input: gadget_for_host_arch, output: gadget_name, command: [ lipo, @@ -111,4 +111,6 @@ if need_universal_gadget install: true, install_dir: asset_dir, ) +else + gadget = gadget_for_host_arch endif diff --git a/tests/meson.build b/tests/meson.build index 4d8d21f32..7789adad8 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -10,6 +10,7 @@ test_sources = [ ] test_vala_args = [] +test_depends = [] if agent_compat != '' test_vala_args += '--define=CROSS_ARCH' @@ -18,6 +19,7 @@ endif if build_gadget test_vala_args += '--define=HAVE_GADGET' test_sources += 'test-gadget.vala' + test_depends += gadget endif subdir('labrats') @@ -89,5 +91,5 @@ runner = custom_target('frida-tests', test('core', python, args: [files('run.py'), runner.full_path()], timeout: 120, - depends: [runner, labrats], + depends: [runner, labrats, test_depends], )