| From 95cacf345eaec898a47486fc0d33382f303275aa Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> |
| Date: Wed, 27 Oct 2021 20:18:47 +0200 |
| Subject: [PATCH] Support cross builds a bit better |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| * Do not build/run mozjs-linked program |
| * Do not try to run test applications |
| |
| Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690] |
| |
| Signed-off-by: Andreas MΓΌller <schnitzeltony@gmail.com> |
| |
| --- |
| meson.build | 4 +++- |
| 1 file changed, 3 insertions(+), 1 deletion(-) |
| |
| diff --git a/meson.build b/meson.build |
| index 961660f..86239a4 100644 |
| --- a/meson.build |
| +++ b/meson.build |
| @@ -255,6 +255,7 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with |
| --disable-debug.''') |
| endif |
| |
| +if not meson.is_cross_build() |
| # Check if a minimal SpiderMonkey program compiles, links, and runs. If not, |
| # it's most likely the case that SpiderMonkey was configured incorrectly, for |
| # example by building mozglue as a shared library. |
| @@ -285,6 +286,7 @@ elif minimal_program.returncode() != 0 |
| failed to execute. Most likely you should build it with a different |
| configuration.''' + recommended_configuration) |
| endif |
| +endif # not meson.is_cross_build() |
| |
| have_printf_alternative_int = cc.compiles(''' |
| #include <stdio.h> |
| @@ -683,7 +685,7 @@ subdir('installed-tests') |
| |
| # Note: The test program in test/ needs to be ported |
| # to Windows before we can build it on Windows. |
| -if host_machine.system() != 'windows' |
| +if host_machine.system() != 'windows' and not meson.is_cross_build() |
| subdir('test') |
| endif |
| |