diff options
-rw-r--r-- | ports/geckolib/Cargo.lock | 167 | ||||
-rw-r--r-- | ports/geckolib/Cargo.toml | 19 | ||||
-rw-r--r-- | ports/geckolib/lib.rs | 1 | ||||
-rw-r--r-- | ports/geckolib/selector_impl.rs | 3 | ||||
-rw-r--r-- | ports/stable-rust/.gitignore | 1 | ||||
-rw-r--r-- | ports/stable-rust/Cargo.toml | 6 | ||||
-rw-r--r-- | ports/stable-rust/src/lib.rs | 10 | ||||
-rw-r--r-- | python/servo/bootstrap_commands.py | 14 | ||||
-rw-r--r-- | python/servo/build_commands.py | 45 | ||||
-rw-r--r-- | python/servo/command_base.py | 17 |
10 files changed, 17 insertions, 266 deletions
diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock index bec14181271..d5a0608dde3 100644 --- a/ports/geckolib/Cargo.lock +++ b/ports/geckolib/Cargo.lock @@ -7,7 +7,6 @@ dependencies = [ "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "gecko_bindings 0.0.1", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -17,10 +16,8 @@ dependencies = [ "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "style 0.0.1", "style_traits 0.0.1", - "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", - "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -43,79 +40,17 @@ dependencies = [ ] [[package]] -name = "aster" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "backtrace" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "gcc 0.3.28 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bincode" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "bitflags" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "cssparser" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_macros 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "dbghelp-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -210,11 +145,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "gcc" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "gecko_bindings" version = "0.0.1" dependencies = [ @@ -235,11 +165,6 @@ dependencies = [ ] [[package]] -name = "heapsize_plugin" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "idna" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -250,19 +175,6 @@ dependencies = [ ] [[package]] -name = "ipc-channel" -version = "0.2.4" -source = "git+https://github.com/servo/ipc-channel#8411eeabf3a712006ad1b47637b2d8fe71177f85" -dependencies = [ - "bincode 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "kernel32-sys" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -313,27 +225,6 @@ dependencies = [ ] [[package]] -name = "quasi" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "quasi_codegen" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aster 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quasi_macros" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quasi_codegen 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "quickersort" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -368,11 +259,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "rustc-demangle" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "rustc-serialize" version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -385,8 +271,6 @@ dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -399,30 +283,6 @@ version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "serde_codegen" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aster 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quasi_macros 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_item 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_item" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_macros" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_codegen 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "smallvec" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -455,8 +315,6 @@ dependencies = [ "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "gecko_bindings 0.0.1", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -466,8 +324,6 @@ dependencies = [ "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_macros 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", "style_traits 0.0.1", @@ -483,11 +339,7 @@ version = "0.0.1" dependencies = [ "cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_macros 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", ] @@ -515,7 +367,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -545,13 +396,8 @@ name = "url" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "heapsize_plugin 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -564,32 +410,19 @@ name = "util" version = "0.0.1" dependencies = [ "app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ipc-channel 0.2.4 (git+https://github.com/servo/ipc-channel)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_macros 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "uuid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml index 8f1112ccddc..48df8485e94 100644 --- a/ports/geckolib/Cargo.toml +++ b/ports/geckolib/Cargo.toml @@ -10,29 +10,12 @@ name = "geckoservo" path = "lib.rs" crate-type = ["staticlib"] -[features] -default = ["servo_features"] - -# Features that aren't actually required for geckolib, but match the ones used -# in the full Servo build. Enabling this reduces the number of things -# recompiled when building both Servo and geckolib in the same source tree. -servo_features = [ - "heapsize", - "selectors/unstable", - "style/servo", - "time", - "url/query_encoding", - "url/rustc-serialize", - "uuid", -] - [dependencies] app_units = "0.2.5" cssparser = "0.5.4" env_logger = "0.3" euclid = "0.7.1" gecko_bindings = {version = "0.0.1", path = "gecko_bindings"} -heapsize = {version = "0.3.0", optional = true} lazy_static = "0.2" libc = "0.2" log = {version = "0.3.5", features = ["release_max_level_info"]} @@ -42,10 +25,8 @@ smallvec = "0.1" string_cache = {version = "0.2.20", features = ["unstable"]} style = {path = "../../components/style", features = ["gecko"]} style_traits = {path = "../../components/style_traits"} -time = {version = "0.1", optional = true, features = ["rustc-serialize"]} url = "1.0.0" util = {path = "../../components/util"} -uuid = {version = "0.2", optional = true, features = ["v4", "serde"]} [replace] "string_cache:0.2.20" = {path = "string_cache"} diff --git a/ports/geckolib/lib.rs b/ports/geckolib/lib.rs index 357cb9a3d70..02da948fd32 100644 --- a/ports/geckolib/lib.rs +++ b/ports/geckolib/lib.rs @@ -8,7 +8,6 @@ extern crate cssparser; extern crate env_logger; extern crate euclid; extern crate gecko_bindings; -#[cfg(feature = "servo_features")] #[macro_use] extern crate heapsize; #[macro_use] extern crate lazy_static; extern crate libc; diff --git a/ports/geckolib/selector_impl.rs b/ports/geckolib/selector_impl.rs index a2f0d1eba92..45b46ea49bb 100644 --- a/ports/geckolib/selector_impl.rs +++ b/ports/geckolib/selector_impl.rs @@ -15,9 +15,6 @@ pub type SharedStyleContext = style::context::SharedStyleContext<GeckoSelectorIm pub type PrivateStyleData = style::data::PrivateStyleData<GeckoSelectorImpl, GeckoComputedValues>; pub type Animation = style::animation::Animation<GeckoSelectorImpl>; -#[cfg(feature = "servo_features")] -known_heap_size!(0, GeckoSelectorImpl, PseudoElement, NonTSPseudoClass); - #[derive(Debug, Clone)] pub struct GeckoSelectorImpl; diff --git a/ports/stable-rust/.gitignore b/ports/stable-rust/.gitignore deleted file mode 100644 index ea8c4bf7f35..00000000000 --- a/ports/stable-rust/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/ports/stable-rust/Cargo.toml b/ports/stable-rust/Cargo.toml deleted file mode 100644 index 6240d6e0632..00000000000 --- a/ports/stable-rust/Cargo.toml +++ /dev/null @@ -1,6 +0,0 @@ -[package] -name = "stable-rust" -version = "0.0.1" -authors = ["The Servo Project Developers"] - -[dependencies] diff --git a/ports/stable-rust/src/lib.rs b/ports/stable-rust/src/lib.rs deleted file mode 100644 index 6bbd4e4ce37..00000000000 --- a/ports/stable-rust/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -/* 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/. */ - -#[cfg(test)] -mod test { - #[test] - fn it_works() { - } -} diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index a4cf509f113..13db36079ae 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -138,12 +138,7 @@ class MachCommands(CommandBase): self.set_use_stable_rust(stable) version = self.rust_version() rust_path = self.rust_path() - if stable: - rust_dir = path.join( - self.context.sharedir, "rust", version, rust_path) - else: - rust_dir = path.join( - self.context.sharedir, "rust", rust_path) + rust_dir = path.join(self.context.sharedir, "rust", rust_path) install_dir = path.join(self.context.sharedir, "rust", version) if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc" + BIN_SUFFIX)): @@ -160,9 +155,10 @@ class MachCommands(CommandBase): # giving a directory name that will be the same as the tarball name (rustc is # in that directory). if stable: - rustc_url = "https://static.rust-lang.org/dist/%s.tar.gz" % rust_path + tarball = "rustc-%s-%s.tar.gz" % (version, host_triple()) else: - rustc_url = "https://static-rust-lang-org.s3.amazonaws.com/dist/%s.tar.gz" % rust_path + tarball = "%s/rustc-nightly-%s.tar.gz" % (version, host_triple()) + rustc_url = "https://static-rust-lang-org.s3.amazonaws.com/dist/" + tarball tgz_file = rust_dir + '-rustc.tar.gz' download_file("Rust compiler", rustc_url, tgz_file) @@ -196,7 +192,7 @@ class MachCommands(CommandBase): continue if self.use_stable_rust(): - std_url = ("https://static.rust-lang.org/dist/rust-std-%s-%s.tar.gz" + std_url = ("https://static-rust-lang-org.s3.amazonaws.com/dist/rust-std-%s-%s.tar.gz" % (version, target_triple)) tgz_file = install_dir + ('rust-std-%s-%s.tar.gz' % (version, target_triple)) else: diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 7a4dba41cfa..0e7151e5efc 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -265,43 +265,6 @@ class MachCommands(CommandBase): print("Build completed in %s" % format_duration(elapsed)) return status - @Command('build-stable', - description='Build Servo using stable rustc', - category='build') - @CommandArgument('--target', '-t', - default=None, - help='Cross compile for given target platform') - @CommandArgument('--release', '-r', - action='store_true', - help='Build in release mode') - @CommandArgument('--dev', '-d', - action='store_true', - help='Build in development mode') - @CommandArgument('--jobs', '-j', - default=None, - help='Number of jobs to run in parallel') - @CommandArgument('--features', - default=None, - help='Space-separated list of features to also build', - nargs='+') - @CommandArgument('--android', - default=None, - action='store_true', - help='Build for Android') - @CommandArgument('--debug-mozjs', - default=None, - action='store_true', - help='Enable debug assertions in mozjs') - @CommandArgument('--verbose', '-v', - action='store_true', - help='Print verbose output') - @CommandArgument('params', nargs='...', - help="Command-line arguments to be passed through to Cargo") - def build_stable(self, target=None, release=False, dev=False, jobs=None, - features=None, android=None, verbose=False, debug_mozjs=False, params=None): - self.set_use_stable_rust() - self.build(target, release, dev, jobs, features, android, verbose, debug_mozjs, params) - @Command('build-cef', description='Build the Chromium Embedding Framework library', category='build') @@ -356,6 +319,7 @@ class MachCommands(CommandBase): action='store_true', help='Build in release mode') def build_geckolib(self, jobs=None, verbose=False, release=False): + self.set_use_stable_rust() self.ensure_bootstrapped() ret = None @@ -367,11 +331,12 @@ class MachCommands(CommandBase): if release: opts += ["--release"] - build_start = time() env = self.build_env() + env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target", "geckolib") + + build_start = time() with cd(path.join("ports", "geckolib")): - ret = call(["cargo", "build"] + opts, - env=env, verbose=verbose) + ret = call(["cargo", "build"] + opts, env=env, verbose=verbose) elapsed = time() - build_start # Generate Desktop Notification if elapsed-time > some threshold value diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 9f4f9096316..a814f58fbf9 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -218,10 +218,11 @@ class CommandBase(object): return self._use_stable_rust def rust_path(self): + version = self.rust_version() if self._use_stable_rust: - return "rustc-%s-%s" % (self.rust_version(), host_triple()) + return "%s/rustc-%s-%s" % (version, version, host_triple()) else: - return "%s/rustc-nightly-%s" % (self.rust_version(), host_triple()) + return "%s/rustc-nightly-%s" % (version, host_triple()) def rust_version(self): if self._rust_version is None or self._use_stable_rust != self._rust_version_is_stable: @@ -332,10 +333,7 @@ class CommandBase(object): env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"] - if self.use_stable_rust(): - env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "ports/stable-rust/target") - elif "CARGO_TARGET_DIR" not in env: - env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target") + env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target") if extra_lib: if sys.platform == "darwin": @@ -436,10 +434,9 @@ class CommandBase(object): rustc_binary_exists = path.exists(rustc_path) base_target_path = path.join(rust_root, "rustc", "lib", "rustlib") - target_exists = True - if target is not None: - target_path = path.join(base_target_path, target) - target_exists = path.exists(target_path) + + target_path = path.join(base_target_path, target or host_triple()) + target_exists = path.exists(target_path) if not (self.config['tools']['system-rust'] or (rustc_binary_exists and target_exists)): print("looking for rustc at %s" % (rustc_path)) |