blob: 55af681af0f124143791d42fa06ec745f89ce075 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 550e98013b0e003c1a6771d8e811375913adf16b Mon Sep 17 00:00:00 2001
2From: =?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
12Upstream-Status: Submitted[https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690]
13
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
20index dfcc2c3..192b1b5 100644
21--- a/meson.build
22+++ b/meson.build
23@@ -234,6 +234,7 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with
24 --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.
31@@ -254,6 +255,7 @@ could not be compiled, linked, or run. Most likely you should build it with a
32 different configuration. Check the recommended configuration:
33 https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md''')
34 endif
35+endif # not meson.is_cross_build()
36
37 have_printf_alternative_int = cc.compiles('''
38 #include <stdio.h>
39@@ -662,7 +664,7 @@ endif
40
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
48--
492.31.1
50