Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.

This commit is contained in:
Ms2ger 2015-03-11 11:08:57 +01:00 committed by Josh Matthews
parent 65d4b12bf2
commit 5f15eb5fbf
140 changed files with 1420 additions and 1222 deletions

View file

@ -79,7 +79,7 @@ class MachCommands(CommandBase):
def bootstrap_rustc(self, force=False):
rust_dir = path.join(
self.context.sharedir, "rust", *self.rust_snapshot_path().split("/"))
if not force and path.exists(path.join(rust_dir, "bin", "rustc")):
if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc")):
print("Snapshot Rust compiler already downloaded.", end=" ")
print("Use |bootstrap-rust --force| to download again.")
return
@ -130,7 +130,9 @@ class MachCommands(CommandBase):
if path.isdir(temp_dir):
shutil.rmtree(temp_dir)
extract(tgz_file, temp_dir)
shutil.move(path.join(temp_dir, docs_name.split("/")[1], "share", "doc", "rust", "html"), docs_dir)
shutil.move(path.join(temp_dir, docs_name.split("/")[1],
"rust-docs", "share", "doc", "rust", "html"),
docs_dir)
shutil.rmtree(temp_dir)
print("Rust docs ready.")

View file

@ -93,7 +93,9 @@ class MachCommands(CommandBase):
status = subprocess.call(
make_cmd + ["-f", "openssl.makefile"],
env=self.build_env())
env['OPENSSL_PATH'] = path.join(self.android_support_dir(), "openssl-1.0.1k")
openssl_dir = path.join(self.android_support_dir(), "openssl-1.0.1k")
env['OPENSSL_LIB_DIR'] = openssl_dir
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
status = subprocess.call(
["cargo", "build"] + opts,

View file

@ -128,12 +128,12 @@ class CommandBase(object):
if not self.config["tools"]["system-rust"] \
or self.config["tools"]["rust-root"]:
env["RUST_ROOT"] = self.config["tools"]["rust-root"]
extra_path += [path.join(self.config["tools"]["rust-root"], "bin")]
extra_lib += [path.join(self.config["tools"]["rust-root"], "lib")]
extra_path += [path.join(self.config["tools"]["rust-root"], "rustc", "bin")]
extra_lib += [path.join(self.config["tools"]["rust-root"], "rustc", "lib")]
if not self.config["tools"]["system-cargo"] \
or self.config["tools"]["cargo-root"]:
extra_path += [
path.join(self.config["tools"]["cargo-root"], "bin")]
path.join(self.config["tools"]["cargo-root"], "cargo", "bin")]
if extra_path:
env["PATH"] = "%s%s%s" % (
@ -192,7 +192,9 @@ class CommandBase(object):
"--sysroot=%(gonkdir)s/out/target/product/%(gonkproduct)s/obj/") % {"gonkdir": env["GONKDIR"], "gonkproduct": env["GONK_PRODUCT"] }
# Not strictly necessary for a vanilla build, but might be when tweaking the openssl build
env["OPENSSL_PATH"] = "%(gonkdir)s/out/target/product/%(gonkproduct)s/obj/lib" % {"gonkdir": env["GONKDIR"], "gonkproduct": env["GONK_PRODUCT"] }
openssl_dir = "%(gonkdir)s/out/target/product/%(gonkproduct)s/obj/lib" % {"gonkdir": env["GONKDIR"], "gonkproduct": env["GONK_PRODUCT"] }
env["OPENSSL_LIB_DIR"] = openssl_dir
env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
# FIXME: These are set because they are the variable names that
# android-rs-glue expects. However, other submodules have makefiles that
@ -233,11 +235,11 @@ class CommandBase(object):
if not self.config["tools"]["system-rust"] and \
not path.exists(path.join(
self.config["tools"]["rust-root"], "bin", "rustc")):
self.config["tools"]["rust-root"], "rustc", "bin", "rustc")):
Registrar.dispatch("bootstrap-rust", context=self.context)
if not self.config["tools"]["system-cargo"] and \
not path.exists(path.join(
self.config["tools"]["cargo-root"], "bin", "cargo")):
self.config["tools"]["cargo-root"], "cargo", "bin", "cargo")):
Registrar.dispatch("bootstrap-cargo", context=self.context)
self.context.bootstrapped = True

View file

@ -35,7 +35,7 @@ class MachCommands(CommandBase):
def get_binary_path(self, release, dev):
base_path = path.join("components", "servo", "target")
release_path = path.join(base_path, "release", "servo")
dev_path = path.join(base_path, "servo")
dev_path = path.join(base_path, "debug", "servo")
# Prefer release if both given
if release and dev:

View file

@ -36,12 +36,12 @@ class MachCommands(CommandBase):
def find_test(self, prefix):
target_contents = os.listdir(path.join(
self.context.topdir, "components", "servo", "target"))
self.context.topdir, "components", "servo", "target", "debug"))
for filename in target_contents:
if filename.startswith(prefix + "-"):
filepath = path.join(
self.context.topdir, "components", "servo",
"target", filename)
"target", "debug", filename)
if path.isfile(filepath) and os.access(filepath, os.X_OK):
return filepath