Bug 1338655 - Don't try to build mp4parse bindings. r?froydnj draft
authorRalph Giles <giles@mozilla.com>
Fri, 10 Feb 2017 12:58:18 -0800
changeset 482011 d005d11f41ef587ced593a5b055d31de83766575
parent 482010 44fadeab7a4353c2eab451c7cd08f5cb58b07cb1
child 545343 334e23d6655598122629b22d4a54a55e47f4b264
push id44981
push userbmo:giles@thaumas.net
push dateFri, 10 Feb 2017 21:11:27 +0000
reviewersfroydnj
bugs1338655
milestone54.0a1
Bug 1338655 - Don't try to build mp4parse bindings. r?froydnj We use the cheddar crate to generate a C header file for our mp4parse_capi wrapper crate. Currently we do this at code check-in time via update-rust.sh. Cargo 0.18 and later will try to execute a build.rs file in the crate source tree regardless of whether it's specified in Cargo.toml so patching out that line just results in 'crate cheddar not found'. This change restores the old behaviour by substituting a 'build = false' line instead. We do have syntex vendored, but we don't currently build it by default, so I prefer this solution to just vendoring cheddar and generating the header at build time. The syntex crate is quite large and adds significantly to our compile time. MozReview-Commit-ID: InJRRODWAdP
media/libstagefright/binding/mp4parse-cargo.patch
media/libstagefright/binding/mp4parse_capi/Cargo.toml
--- a/media/libstagefright/binding/mp4parse-cargo.patch
+++ b/media/libstagefright/binding/mp4parse-cargo.patch
@@ -22,22 +22,23 @@ index ff9422c..814c4c6 100644
 -
  # Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
  [profile.release]
  debug-assertions = true
 diff --git a/media/libstagefright/binding/mp4parse_capi/Cargo.toml b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
 index aeeebc65..5c0836a 100644
 --- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
 +++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
-@@ -18,18 +18,10 @@ exclude = [
+@@ -18,18 +18,12 @@ exclude = [
    "*.mp4",
  ]
  
 -build = "build.rs"
--
++build = false
+
  [dependencies]
  byteorder = "1.0.0"
  "mp4parse" = {version = "0.6.0", path = "../mp4parse"}
  
 -[build-dependencies]
 -rusty-cheddar = "0.3.2"
 -
 -[features]
--- a/media/libstagefright/binding/mp4parse_capi/Cargo.toml
+++ b/media/libstagefright/binding/mp4parse_capi/Cargo.toml
@@ -13,15 +13,17 @@ license = "MPL-2.0"
 
 repository = "https://github.com/mozilla/mp4parse-rust"
 
 # Avoid complaints about trying to package test files.
 exclude = [
   "*.mp4",
 ]
 
+build = false
+
 [dependencies]
 byteorder = "1.0.0"
 "mp4parse" = {version = "0.6.0", path = "../mp4parse"}
 
 # Somewhat heavy-handed, but we want at least -Z force-overflow-checks=on.
 [profile.release]
 debug-assertions = true