Bug 1231764 - part 1 - search for cargo when --enable-rust; r=chmanchester
☠☠ backed out by 5d2cfad6ba81 ☠ ☠
authorNathan Froyd <froydnj@gmail.com>
Wed, 03 Aug 2016 19:40:41 -0400
changeset 308096 643b03aae1dd2fec67f295fd56bcb5043288e3ae
parent 308095 a945dbf63410b72c7b63eafebfb08fd6f3567a00
child 308097 e3af0b1d3473482b91a90f9cdccdbf62e60df7cb
push id20219
push usercbook@mozilla.com
push dateThu, 04 Aug 2016 14:06:48 +0000
treeherderfx-team@027410f730d7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1231764
milestone51.0a1
Bug 1231764 - part 1 - search for cargo when --enable-rust; r=chmanchester We've going to use it, the location of it should be configurable.
build/moz.configure/rust.configure
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -6,17 +6,23 @@
 
 option('--enable-rust', help='Include Rust language sources')
 
 @depends('--enable-rust')
 def rust_compiler_names(value):
     if value:
         return ['rustc']
 
+@depends('--enable-rust')
+def cargo_binary_names(value):
+    if value:
+        return ['cargo']
+
 rustc = check_prog('RUSTC', rust_compiler_names, allow_missing=True)
+cargo = check_prog('CARGO', cargo_binary_names, allow_missing=True)
 
 @depends_if(rustc)
 @checking('rustc version', lambda info: info.version)
 def rustc_info(rustc):
         out = check_cmd_output(rustc, '--version', '--verbose').splitlines()
         info = dict((s.strip() for s in line.split(':', 1)) for line in out[1:])
         return namespace(
             version=Version(info.get('release', '0')),