Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 15 pull requests #40615

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c7db40f
Rename expected_types_for_fn_args to expected_inputs_for_expected_out…
eddyb Mar 9, 2017
50aee36
Propagate expected type hints through struct literals.
eddyb Mar 9, 2017
5fab9bf
travis: Ensure cargo links libcurl statically
alexcrichton Mar 14, 2017
61d9387
Target builds for older macOS
wagenet Mar 13, 2017
e58f9f5
rustbuild: Update bootstrap compiler
alexcrichton Mar 14, 2017
cc23d17
make shift builtins panic-free with new unchecked_sh* intrinsics
TimNN Mar 14, 2017
2561dcd
Rename TryFrom's associated type and implement str::parse using TryFrom.
jimmycuadra Mar 5, 2017
a457d67
Specialize Vec::from_elem<u8> to use calloc or memset
mbrubeck Mar 10, 2017
4961f6c
Specialize Vec::from_elem for other integer types
mbrubeck Mar 10, 2017
ce616a7
Improve the `TokenStream` quoter.
jseyfried Mar 14, 2017
910532e
Add a test for issue 34571
topecongiro Mar 16, 2017
284ece3
Fix regression when `include!()`ing a `macro_rules!` containing a `$c…
jseyfried Mar 16, 2017
a4bd5e9
Remove internal liblog
alexcrichton Feb 15, 2017
50cede0
documented order of conversion between u32 an ipv4addr
Mar 17, 2017
c96491f
Update libc to 0.2.21
malbarbo Mar 7, 2017
5798817
Fix c_char (u8 -> i8) definition for i686-linux-android
malbarbo Mar 16, 2017
3435c60
Fix libc::bind call on aarch64-linux-android
malbarbo Mar 17, 2017
963d4df
minor wording tweak to slice::{as_ptr, as_mut_ptr}
QuietMisdreavus Mar 17, 2017
ec8ecf4
Fix typo in mutex.rs docs
ScottAbbey Mar 17, 2017
70bbbce
Rollup merge of #40281 - jimmycuadra:try-from-from-str, r=aturon
frewsxcv Mar 17, 2017
b449fda
Rollup merge of #40317 - malbarbo:update-libc, r=alexcrichton
frewsxcv Mar 17, 2017
a6cebc0
Rollup merge of #40347 - alexcrichton:rm-liblog, r=brson
frewsxcv Mar 17, 2017
935a905
Rollup merge of #40398 - eddyb:struct-hint, r=nikomatsakis
frewsxcv Mar 17, 2017
496d185
Rollup merge of #40409 - mbrubeck:calloc, r=sfackler
frewsxcv Mar 17, 2017
0644fae
Rollup merge of #40482 - wagenet:fix-old-macos, r=alexcrichton
frewsxcv Mar 17, 2017
3c4b859
Rollup merge of #40507 - alexcrichton:static-libcurl, r=brson
frewsxcv Mar 17, 2017
be924b1
Rollup merge of #40521 - TimNN:panic-free-shift, r=nagisa
frewsxcv Mar 17, 2017
50bf60e
Rollup merge of #40524 - alexcrichton:update-bootstrap, r=brson
frewsxcv Mar 17, 2017
8db0914
Rollup merge of #40532 - jseyfried:improve_tokenstream_quoter, r=nrc
frewsxcv Mar 17, 2017
55eacfe
Rollup merge of #40583 - jseyfried:fix_include_macro_regression, r=nrc
frewsxcv Mar 17, 2017
7501349
Rollup merge of #40588 - topecongiro:add-missing-tests, r=alexcrichton
frewsxcv Mar 17, 2017
ac1d2e6
Rollup merge of #40590 - z1mvader:master, r=steveklabnik
frewsxcv Mar 17, 2017
02a688b
Rollup merge of #40603 - QuietMisdreavus:slice-ptr-docs, r=GuillaumeG…
frewsxcv Mar 17, 2017
60e7df4
Rollup merge of #40611 - ScottAbbey:patch-1, r=GuillaumeGomez
frewsxcv Mar 17, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: &osx_install_sccache >
Expand All @@ -60,6 +62,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand All @@ -72,6 +76,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: >
Expand All @@ -85,6 +91,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand All @@ -102,6 +110,8 @@ matrix:
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
osx_image: xcode8.2
install: *osx_install_sccache
Expand Down
53 changes: 21 additions & 32 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ fn main() {
cmd.arg("-Cprefer-dynamic");
}

if env::var_os("RUSTC_PASS_RUSTBUILD_FLAG").is_some() {
cmd.arg("--cfg").arg("rustbuild");
}

// Help the libc crate compile by assisting it in finding the MUSL
// native libraries.
if let Some(s) = env::var_os("MUSL_ROOT") {
Expand Down
17 changes: 5 additions & 12 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,8 @@ class RustBuild(object):
def download_stage0(self):
cache_dst = os.path.join(self.build_dir, "cache")
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date())
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_rev())
if not os.path.exists(rustc_cache):
os.makedirs(rustc_cache)
if not os.path.exists(cargo_cache):
os.makedirs(cargo_cache)

if self.rustc().startswith(self.bin_root()) and \
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
Expand Down Expand Up @@ -195,15 +192,15 @@ def download_stage0(self):
if self.cargo().startswith(self.bin_root()) and \
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
self.print_what_it_means_to_bootstrap()
filename = "cargo-nightly-{}.tar.gz".format(self.build)
url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/" + self.stage0_cargo_rev()
tarball = os.path.join(cargo_cache, filename)
filename = "cargo-{}-{}.tar.gz".format(channel, self.build)
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
tarball = os.path.join(rustc_cache, filename)
if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
self.fix_executable(self.bin_root() + "/bin/cargo")
with open(self.cargo_stamp(), 'w') as f:
f.write(self.stage0_cargo_rev())
f.write(self.stage0_rustc_date())

def fix_executable(self, fname):
# If we're on NixOS we need to change the path to the dynamic loader
Expand Down Expand Up @@ -258,9 +255,6 @@ def fix_executable(self, fname):
print("warning: failed to call patchelf: %s" % e)
return

def stage0_cargo_rev(self):
return self._cargo_rev

def stage0_rustc_date(self):
return self._rustc_date

Expand All @@ -283,7 +277,7 @@ def cargo_out_of_date(self):
if not os.path.exists(self.cargo_stamp()) or self.clean:
return True
with open(self.cargo_stamp(), 'r') as f:
return self.stage0_cargo_rev() != f.read()
return self.stage0_rustc_date() != f.read()

def bin_root(self):
return os.path.join(self.build_dir, self.build, "stage0")
Expand Down Expand Up @@ -578,7 +572,6 @@ def bootstrap():

data = stage0_data(rb.rust_root)
rb._rustc_channel, rb._rustc_date = data['rustc'].split('-', 1)
rb._cargo_rev = data['cargo']

# Fetch/build the bootstrap
rb.build = rb.build_triple()
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use build_helper::output;
use Build;

// The version number
pub const CFG_RELEASE_NUM: &'static str = "1.17.0";
pub const CFG_RELEASE_NUM: &'static str = "1.18.0";

// An optional number to put after the label, e.g. '.2' -> '-beta.2'
// Be sure to make this starts with a dot to conform to semver pre-release
Expand Down
9 changes: 9 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use std::collections::HashMap;
use std::fs::{self, File};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::env;

use build_helper::{output, mtime, up_to_date};
use filetime::FileTime;
Expand All @@ -44,6 +45,11 @@ pub fn std(build: &Build, target: &str, compiler: &Compiler) {
build.clear_if_dirty(&out_dir, &build.compiler_path(compiler));
let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build");
let mut features = build.std_features();

if let Ok(target) = env::var("MACOSX_STD_DEPLOYMENT_TARGET") {
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
}

// When doing a local rebuild we tell cargo that we're stage1 rather than
// stage0. This works fine if the local rust and being-built rust have the
// same view of what the default allocator is, but fails otherwise. Since
Expand Down Expand Up @@ -170,6 +176,9 @@ pub fn test(build: &Build, target: &str, compiler: &Compiler) {
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
let mut cargo = build.cargo(compiler, Mode::Libtest, target, "build");
if let Ok(target) = env::var("MACOSX_STD_DEPLOYMENT_TARGET") {
cargo.env("MACOSX_DEPLOYMENT_TARGET", target);
}
cargo.arg("--manifest-path")
.arg(build.src.join("src/libtest/Cargo.toml"));
build.run(&mut cargo);
Expand Down
13 changes: 13 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,19 @@ impl Build {
.env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_libdir(compiler));
}

// Most of the time we want to pass `--cfg rustbuild` which will flag
// upstream crates.io crates to compile themselves as unstable as we're
// going to put them in the sysroot. If we're compiling tools, however,
// we don't want to do that as the upstream crates.io deps may be in the
// crate graph and we don't want to compile them with their unstable
// versions.
match mode {
Mode::Tool => {}
_ => {
cargo.env("RUSTC_PASS_RUSTBUILD_FLAG", "1");
}
}

// Ignore incremental modes except for stage0, since we're
// not guaranteeing correctness acros builds if the compiler
// is changing under your feet.`
Expand Down
6 changes: 6 additions & 0 deletions src/ci/docker/dist-x86-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,10 @@ ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-sanitizers
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

# This is the only builder which will create source tarballs
ENV DIST_SRC 1

# When we build cargo in this container, we don't want it to use the system
# libcurl, instead it should compile its own.
ENV LIBCURL_NO_PKG_CONFIG 1
Loading