blob: c46f85b7dc5d73894e45fdfbfe09bbca512a5049 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001From fa47185d9c8150a0dcb0ea12b92fcf139edbef35 Mon Sep 17 00:00:00 2001
Andrew Geissler595f6302022-01-24 19:11:47 +00002From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Wed, 27 Oct 2021 20:18:47 +0200
4Subject: [PATCH] Support cross builds a bit better
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9* Do not build/run mozjs-linked program
10* Do not try to run test applications
11
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060012Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690]
Andrew Geissler595f6302022-01-24 19:11:47 +000013
14Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com>
15---
16 meson.build | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19diff --git a/meson.build b/meson.build
Andrew Geissler9aee5002022-03-30 16:27:02 +000020index 136e812..f5b91e0 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000021--- a/meson.build
22+++ b/meson.build
Andrew Geissler9aee5002022-03-30 16:27:02 +000023@@ -252,6 +252,7 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with
Andrew Geissler595f6302022-01-24 19:11:47 +000024 --disable-debug.''')
25 endif
26
27+if not meson.is_cross_build()
28 # Check if a minimal SpiderMonkey program compiles, links, and runs. If not,
29 # it's most likely the case that SpiderMonkey was configured incorrectly, for
30 # example by building mozglue as a shared library.
Andrew Geissler9aee5002022-03-30 16:27:02 +000031@@ -282,6 +283,7 @@ elif minimal_program.returncode() != 0
32 failed to execute. Most likely you should build it with a different
33 configuration.''' + recommended_configuration)
Andrew Geissler595f6302022-01-24 19:11:47 +000034 endif
35+endif # not meson.is_cross_build()
36
37 have_printf_alternative_int = cc.compiles('''
38 #include <stdio.h>
Andrew Geissler9aee5002022-03-30 16:27:02 +000039@@ -682,7 +684,7 @@ subdir('installed-tests')
Andrew Geissler595f6302022-01-24 19:11:47 +000040
41 # Note: The test program in test/ needs to be ported
42 # to Windows before we can build it on Windows.
43-if host_machine.system() != 'windows'
44+if host_machine.system() != 'windows' and not meson.is_cross_build()
45 subdir('test')
46 endif
47