Bug 1294630 - Move --enable-ipc-fuzzer to python configure. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 10 Aug 2016 16:54:08 +0900
changeset 400930 88e4f55d07072749bb41bf8affab4fb4d9e8b85d
parent 400929 b41fac93dc9087b4f7e6b71a2d3d80c7a6928f60
child 401029 ef17eec4716c41bb5a3261b07b51e0515a5c28ed
push id26301
push userbmo:mh+mozilla@glandium.org
push dateTue, 16 Aug 2016 00:19:46 +0000
reviewerschmanchester
bugs1294630
milestone51.0a1
Bug 1294630 - Move --enable-ipc-fuzzer to python configure. r?chmanchester
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -310,18 +310,16 @@ def old_configure_options(*options):
     '--x-includes',
     '--x-libraries',
 
     # Below are the configure flags used by comm-central.
     '--enable-ldap',
     '--enable-mapi',
     '--enable-calendar',
     '--enable-incomplete-external-linkage',
-
-    '--enable-ipc-fuzzer',
 )
 @imports(_from='__builtin__', _import='compile')
 @imports(_from='__builtin__', _import='open')
 @imports('logging')
 @imports('os')
 @imports('subprocess')
 @imports('sys')
 @imports(_from='mozbuild.shellutil', _import='quote')
--- a/old-configure.in
+++ b/old-configure.in
@@ -794,34 +794,16 @@ if test "$MOZ_PROFILING" -a -z "$STRIP_F
     case "$OS_TARGET" in
     Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
         STRIP_FLAGS="--strip-debug"
         ;;
     esac
 fi
 
 dnl ========================================================
-dnl = Enable Gecko integrated IPC fuzzer
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(ipc-fuzzer,
-[  --enable-ipc-fuzzer       Enable IPC fuzzer (default=no)],
-    MOZ_FAULTY=1,
-    MOZ_FAULTY= )
-AC_SUBST(MOZ_FAULTY)
-
-if test -n "$MOZ_FAULTY" && test "$OS_ARCH" = "WINNT"; then
-    AC_MSG_ERROR([--enable-ipc-fuzzer is not supported on this platform.])
-fi
-
-if test -n "$MOZ_FAULTY"; then
-    MOZ_FAULTY=1
-    AC_DEFINE(MOZ_FAULTY)
-fi
-
-dnl ========================================================
 dnl = Enable DMD
 dnl ========================================================
 
 if test "$MOZ_DMD"; then
     if test "${CPU_ARCH}" = "arm"; then
         CFLAGS="$CFLAGS -funwind-tables"
         CXXFLAGS="$CXXFLAGS -funwind-tables"
     fi
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -485,8 +485,23 @@ option('--with-servo', env='SERVO_TARGET
             'servo style system')
 
 @depends_if('--with-servo')
 def servo_target_dir(value):
     return value[0]
 
 set_define('MOZ_STYLO', depends_if(servo_target_dir)(lambda x: bool(x)))
 set_config('SERVO_TARGET_DIR', servo_target_dir)
+
+# Gecko integrated IPC fuzzer
+# ==============================================================
+option('--enable-ipc-fuzzer', env='MOZ_FAULTY',
+       help='Enable IPC fuzzer')
+
+@depends('--enable-ipc-fuzzer', target)
+def ipc_fuzzer(value, target):
+    if value:
+        if target.os == 'WINNT':
+            die('--enable-ipc-fuzzer is not supported on this platform.')
+        return bool(value)
+
+set_config('MOZ_FAULTY', ipc_fuzzer)
+set_define('MOZ_FAULTY', ipc_fuzzer)