1 From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001
2 From: Till Schneidereit <till@tillschneidereit.net>
3 Date: Thu, 1 Oct 2015 12:59:09 +0200
4 Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all
7 Otherwise, build fails not being able to find HashBytes.
9 Patch ported forward to mozjs52 by Philip Chimento
10 <philip.chimento@gmail.com>.
12 https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
14 js/src/old-configure.in | 23 ++++++++++++++---------
15 mozglue/build/moz.build | 2 +-
16 2 files changed, 15 insertions(+), 10 deletions(-)
18 diff --git a/js/src/old-configure.in b/js/src/old-configure.in
19 index 1c5c9e21..ff0617e3 100644
20 --- a/js/src/old-configure.in
21 +++ b/js/src/old-configure.in
22 @@ -1623,16 +1623,21 @@ dnl ========================================================
24 dnl ========================================================
26 -case "${OS_TARGET}" in
27 -Android|WINNT|Darwin)
28 +dnl In stand-alone builds we always only want to link executables against mozglue.
29 +if test "$JS_STANDALONE"; then
33 - dnl On !Android !Windows !OSX, we only want to link executables against mozglue
34 - MOZ_GLUE_IN_PROGRAM=1
35 - AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
39 + case "${OS_TARGET}" in
40 + Android|WINNT|Darwin)
41 + MOZ_GLUE_IN_PROGRAM=
44 + dnl On !Android !Windows !OSX, we only want to link executables against mozglue
45 + MOZ_GLUE_IN_PROGRAM=1
46 + AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
51 if test "$MOZ_MEMORY"; then
52 if test "x$MOZ_DEBUG" = "x1"; then
53 diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
54 index d2897477..e3be5a2b 100644
55 --- a/mozglue/build/moz.build
56 +++ b/mozglue/build/moz.build
59 # Build mozglue as a shared lib on Windows, OSX and Android.
60 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
61 -if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
62 +if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
63 SharedLibrary('mozglue')