Bug 1219530 - Add MOZ_RUST_MP4PARSE feature switch. r=glandium
authorRalph Giles <giles@mozilla.com>
Mon, 02 Nov 2015 16:40:00 -0800
changeset 270900 43ce9581fb647fe22dd5fa12069409cdd701b8a7
parent 270899 9d35ff5cf79698988fb3dac6628cb00c255e9337
child 270901 c00bd9bed2252e54ad15c69a875ab7ea5668e846
push id29626
push usercbook@mozilla.com
push dateTue, 03 Nov 2015 11:00:46 +0000
treeherdermozilla-central@bb4d614a0b09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1219530
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1219530 - Add MOZ_RUST_MP4PARSE feature switch. r=glandium Add a switch to enable the rust mp4parser code through confvars.sh and set this for browser targets. Configure will only pass this through as a CPP define if the rust toolchain is available. The MOZ_RUST check is hoisted to an outer conditional to make it cleaner to add other features. Thanks to zhoubcfan@163.com for the typo fix in configure.in.
browser/confvars.sh
configure.in
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -58,14 +58,15 @@ MOZ_WEBAPP_RUNTIME=1
 MOZ_MEDIA_NAVIGATOR=1
 MOZ_WEBGL_CONFORMANT=1
 # Enable navigator.mozPay
 MOZ_PAY=1
 # Enable activities. These are used for FxOS developers currently.
 MOZ_ACTIVITIES=1
 MOZ_JSDOWNLOADS=1
 MOZ_WEBM_ENCODER=1
+MOZ_RUST_MP4PARSE=1
 
 # Enable checking that add-ons are signed by the trusted root
 MOZ_ADDON_SIGNING=1
 
 # Include the DevTools client, not just the server (which is the default)
 MOZ_DEVTOOLS=all
--- a/configure.in
+++ b/configure.in
@@ -4025,16 +4025,23 @@ fi
 if test -n "$MOZ_MULET"; then
     AC_DEFINE(MOZ_MULET)
 fi
 
 if test -n "$MOZ_B2GDROID"; then
     AC_DEFINE(MOZ_B2GDROID)
 fi
 
+# Propagate feature switches for code written in rust from confvars.sh
+if test -n "$MOZ_RUST"; then
+    if test -n "$MOZ_RUST_MP4PARSE"; then
+        AC_DEFINE(MOZ_RUST_MP4PARSE)
+    fi
+fi
+
 AC_SUBST(MOZ_BUILD_APP)
 AC_SUBST(MOZ_PHOENIX)
 AC_SUBST(MOZ_XULRUNNER)
 AC_SUBST(MOZ_B2G)
 AC_SUBST(MOZ_MULET)
 AC_SUBST(MOZ_B2G_VERSION)
 AC_SUBST(MOZ_B2GDROID)