Bug 1276927: Remove Gonk from JS builds where possible, r=dvander draft
authorThomas Zimmermann <tdz@users.sourceforge.net>
Wed, 15 Jun 2016 09:31:28 +0100
changeset 378342 a118c4b48149cdfb7ba5c849b5f21410763b5118
parent 378341 d96364e8f876156a30367dcbe8963e5eb8eed631
child 378343 cf32ffe187bbba24753b1e76c3005f15adb4d9c5
push id20985
push usertdz@users.sourceforge.net
push dateThu, 16 Jun 2016 07:41:33 +0000
reviewersdvander
bugs1276927
milestone50.0a1
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
js/src/jscntxt.cpp
js/src/old-configure.in
--- 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