Bug 1323901 - Hardcode rustc.exe and cargo.exe for detection on Windows. r?glandium
MozReview-Commit-ID: IfJ7lX4Nkt8
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -2,23 +2,29 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
option('--disable-rust', help='Don\'t include Rust language sources')
@depends('--enable-rust')
+@imports('platform')
def rust_compiler_names(value):
if value:
+ if platform.system() == 'Windows':
+ return ['rustc.exe']
return ['rustc']
@depends('--enable-rust')
+@imports('platform')
def cargo_binary_names(value):
if value:
+ if platform.system() == 'Windows':
+ return ['cargo.exe']
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):