Bug 1276927: Remove Gonk from JS builds where possible, r=dvander
B2G/Gonk is just a special case of Android builds. Removing Gonk
code from JS builds simplifies the build process and maintenance.
MozReview-Commit-ID: 6mxm2Hqmx0c
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -977,17 +977,17 @@ JSContext::currentlyRunning() const
}
return false;
}
static bool
ComputeIsJITBroken()
{
-#if !defined(ANDROID) || defined(GONK)
+#if !defined(ANDROID)
return false;
#else // ANDROID
if (getenv("JS_IGNORE_JIT_BROKENNESS")) {
return false;
}
std::string line;
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -77,39 +77,20 @@ MOZ_DEFAULT_COMPILER
if test -z "$JS_STANDALONE"; then
autoconfmk=autoconf-js.mk
#DIST is exported from top-level configure
else
DIST="$MOZ_BUILD_ROOT/dist"
fi
AC_SUBST(autoconfmk)
-if test -n "$gonkdir" ; then
- kernel_name=`uname -s | tr "[[:upper:]]" "[[:lower:]]"`
- dnl Default to ICS
- ANDROID_VERSION=15
- if test -n "${PLATFORM_SDK_VERSION}"; then
- ANDROID_VERSION="${PLATFORM_SDK_VERSION}"
- fi
-
- STLPORT_CPPFLAGS="-I$_topsrcdir/build/stlport/stlport -I$gonkdir/ndk/sources/cxx-stl/system/include"
- STLPORT_LIBS="-lstlport"
+MOZ_ANDROID_NDK
- CPPFLAGS="-DANDROID $TARGET_C_INCLUDES -I$gonkdir/frameworks/base/native/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic $CPPFLAGS -I$gonkdir/external/valgrind/fxos-include"
- CFLAGS="-fno-short-enums -fno-exceptions $CFLAGS"
- CXXFLAGS="-fno-short-enums -fno-exceptions $CXXFLAGS $STLPORT_CPPFLAGS"
- LIBS="$LIBS $STLPORT_LIBS"
-
- dnl Add -llog by default, since we use it all over the place.
+if test -n "$gonkdir" ; then
LDFLAGS="-L$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib -Wl,-rpath-link=$gonkdir/out/target/product/$GONK_PRODUCT/obj/lib --sysroot=$gonkdir/out/target/product/$GONK_PRODUCT/obj/ -llog $LDFLAGS"
-
- AC_DEFINE(ANDROID)
- AC_DEFINE(GONK)
-else
- MOZ_ANDROID_NDK
fi
case "$target" in
*-apple-darwin*)
MOZ_IOS_SDK
;;
esac