blob: 8ebc8bad8707c8ed79d8ab7379ca458b47fc7e75 [file] [log] [blame]
Andrew Geissler220dafd2023-10-04 10:18:08 -05001From 95cacf345eaec898a47486fc0d33382f303275aa 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>
Andrew Geissler220dafd2023-10-04 10:18:08 -050015
Andrew Geissler595f6302022-01-24 19:11:47 +000016---
17 meson.build | 4 +++-
18 1 file changed, 3 insertions(+), 1 deletion(-)
19
20diff --git a/meson.build b/meson.build
Andrew Geissler220dafd2023-10-04 10:18:08 -050021index 961660f..86239a4 100644
Andrew Geissler595f6302022-01-24 19:11:47 +000022--- a/meson.build
23+++ b/meson.build
Andrew Geissler220dafd2023-10-04 10:18:08 -050024@@ -255,6 +255,7 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with
Andrew Geissler595f6302022-01-24 19:11:47 +000025 --disable-debug.''')
26 endif
27
28+if not meson.is_cross_build()
29 # Check if a minimal SpiderMonkey program compiles, links, and runs. If not,
30 # it's most likely the case that SpiderMonkey was configured incorrectly, for
31 # example by building mozglue as a shared library.
Andrew Geissler220dafd2023-10-04 10:18:08 -050032@@ -285,6 +286,7 @@ elif minimal_program.returncode() != 0
Andrew Geissler9aee5002022-03-30 16:27:02 +000033 failed to execute. Most likely you should build it with a different
34 configuration.''' + recommended_configuration)
Andrew Geissler595f6302022-01-24 19:11:47 +000035 endif
36+endif # not meson.is_cross_build()
37
38 have_printf_alternative_int = cc.compiles('''
39 #include <stdio.h>
Andrew Geissler220dafd2023-10-04 10:18:08 -050040@@ -683,7 +685,7 @@ subdir('installed-tests')
Andrew Geissler595f6302022-01-24 19:11:47 +000041
42 # Note: The test program in test/ needs to be ported
43 # to Windows before we can build it on Windows.
44-if host_machine.system() != 'windows'
45+if host_machine.system() != 'windows' and not meson.is_cross_build()
46 subdir('test')
47 endif
48