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 #41945

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f383cbf
Update to the oxidized rust-installer
cuviper May 8, 2017
c9b2410
Use "rust-installer tarball" to create rustc-src too
cuviper May 8, 2017
defcfb2
Remove wrong or outdated info from CString docs.
mbrubeck May 9, 2017
8eaff4d
Force tool-rust-installer deps to build-only
cuviper May 9, 2017
99f629a
rustc: Add a new `-Z force-unstable-if-unmarked` flag
alexcrichton May 8, 2017
2729b71
Don't use sanitize_sh with rust-installer
cuviper May 10, 2017
e42875c
doc: break into 2 sentences
tshepang May 11, 2017
67a0d27
Ensure we walk the root module of the crate
nrc May 11, 2017
43349e6
Upgrade some comments to doc comments
oli-obk May 11, 2017
641d053
Fix typo in size_hint example comment
mglagla May 11, 2017
eb5fc3c
Update to lzma-sys-0.1.2 to fix Windows crt-static
cuviper May 11, 2017
fb7ba47
Pass crate attributes in visit.rs
nrc May 11, 2017
084b67f
Annotate the license exceptions
brson May 11, 2017
b0c80a9
remove the #[inline] attribute from drop_in_place
arielb1 May 11, 2017
75b69c4
Fix search when looking to sources
GuillaumeGomez May 11, 2017
68c1ce9
rustc_trans: do not attempt to truncate an i1 const to i1.
eddyb May 11, 2017
c85501b
box large variants in MIR
arielb1 May 11, 2017
af0e16c
rustbuild: Use `-Z force-unstable-if-unmarked`
alexcrichton May 8, 2017
ab54f4b
rustc: Remove #![unstable] annotation
alexcrichton May 8, 2017
861a4ed
Update to tar-0.4.12 to fix Windows paths
cuviper May 11, 2017
80891f6
Remove some unused macros from the rust codebase
est31 May 12, 2017
138a4c8
use equality in the coerce-unsized check
nikomatsakis May 12, 2017
7a03b4c
Fix unexpected panic with the -Z treat-err-as-bug option
tommyip May 12, 2017
b874937
Rollup merge of #41843 - cuviper:oxidized-installer, r=alexcrichton
Mark-Simulacrum May 12, 2017
7a0ccb0
Rollup merge of #41847 - alexcrichton:less-unstable-annotations, r=eddyb
Mark-Simulacrum May 12, 2017
f97e4f2
Rollup merge of #41860 - mbrubeck:docs, r=nagisa
Mark-Simulacrum May 12, 2017
5fc8373
Rollup merge of #41896 - tshepang:too-long, r=steveklabnik
Mark-Simulacrum May 12, 2017
5133d05
Rollup merge of #41912 - oli-obk:patch-3, r=eddyb
Mark-Simulacrum May 12, 2017
f1aa759
Rollup merge of #41916 - mglagla:typo, r=sfackler
Mark-Simulacrum May 12, 2017
9d5dae1
Rollup merge of #41918 - brson:lic, r=alexcrichton
Mark-Simulacrum May 12, 2017
f7c39ac
Rollup merge of #41919 - nrc:save-crate, r=eddyb
Mark-Simulacrum May 12, 2017
cf3815e
Rollup merge of #41920 - arielb1:inline-drop, r=eddyb
Mark-Simulacrum May 12, 2017
d33cdc0
Rollup merge of #41921 - GuillaumeGomez:fix-search-style, r=steveklabnik
Mark-Simulacrum May 12, 2017
f7f06f8
Rollup merge of #41923 - eddyb:issue-41744, r=arielb1
Mark-Simulacrum May 12, 2017
9b19970
Rollup merge of #41926 - arielb1:box-mir, r=eddyb
Mark-Simulacrum May 12, 2017
67ef847
Rollup merge of #41934 - est31:remove_unused_macros, r=nagisa
Mark-Simulacrum May 12, 2017
1a602ba
Rollup merge of #41937 - nikomatsakis:issue-41936-variance-coerce-uns…
Mark-Simulacrum May 12, 2017
f0fdb5c
Rollup merge of #41942 - tommyip:master, r=Mark-Simulacrum
Mark-Simulacrum May 12, 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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
path = src/jemalloc
url = https://github.com/rust-lang/jemalloc.git
[submodule "src/rust-installer"]
path = src/rust-installer
path = src/tools/rust-installer
url = https://github.com/rust-lang/rust-installer.git
[submodule "src/liblibc"]
path = src/liblibc
Expand Down
165 changes: 162 additions & 3 deletions src/Cargo.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ members = [
"tools/build-manifest",
"tools/remote-test-client",
"tools/remote-test-server",
"tools/rust-installer",
]

# These projects have their own Cargo.lock
Expand Down
13 changes: 13 additions & 0 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ fn main() {
// do that we pass a weird flag to the compiler to get it to do
// so. Note that this is definitely a hack, and we should likely
// flesh out rpath support more fully in the future.
//
// FIXME: remove condition after next stage0
if stage != "0" {
cmd.arg("-Z").arg("osx-rpath-install-name");
}
Expand All @@ -218,6 +220,17 @@ fn main() {
cmd.arg("-Z").arg("unstable-options");
cmd.arg("-C").arg("target-feature=+crt-static");
}

// Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates
// also in the sysroot.
//
// FIXME: remove condition after next stage0
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
if stage != "0" {
cmd.arg("-Z").arg("force-unstable-if-unmarked");
}
}
}

if verbose > 1 {
Expand Down
137 changes: 69 additions & 68 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ use std::process::{Command, Stdio};

use build_helper::output;

#[cfg(not(target_os = "solaris"))]
const SH_CMD: &'static str = "sh";
// On Solaris, sh is the historical bourne shell, not a POSIX shell, or bash.
#[cfg(target_os = "solaris")]
const SH_CMD: &'static str = "bash";

use {Build, Compiler, Mode};
use channel;
use util::{cp_r, libdir, is_dylib, cp_filtered, copy, exe};
Expand All @@ -55,6 +49,10 @@ pub fn tmpdir(build: &Build) -> PathBuf {
build.out.join("tmp/dist")
}

fn rust_installer(build: &Build) -> Command {
build.tool_cmd(&Compiler::new(0, &build.config.build), "rust-installer")
}

/// Builds the `rust-docs` installer component.
///
/// Slurps up documentation from the `stage`'s `host`.
Expand All @@ -74,14 +72,14 @@ pub fn docs(build: &Build, stage: u32, host: &str) {
let src = build.out.join(host).join("doc");
cp_r(&src, &dst);

let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust-Documentation")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=Rust-documentation-is-installed.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg(format!("--package-name={}-{}", name, host))
.arg("--component-name=rust-docs")
.arg("--legacy-manifest-dirs=rustlib,cargo")
Expand Down Expand Up @@ -124,14 +122,14 @@ pub fn mingw(build: &Build, host: &str) {
.arg(host);
build.run(&mut cmd);

let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust-MinGW")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=Rust-MinGW-is-installed.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg(format!("--package-name={}-{}", name, host))
.arg("--component-name=rust-mingw")
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -190,15 +188,15 @@ pub fn rustc(build: &Build, stage: u32, host: &str) {
}

// Finally, wrap everything up in a nice tarball!
let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=Rust-is-ready-to-roll.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay)))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg("--non-installed-overlay").arg(&overlay)
.arg(format!("--package-name={}-{}", name, host))
.arg("--component-name=rustc")
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -300,14 +298,14 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) {
let src = build.sysroot(compiler).join("lib/rustlib");
cp_r(&src.join(target), &dst);

let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=std-is-standing-at-the-ready.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg(format!("--package-name={}-{}", name, target))
.arg(format!("--component-name=rust-std-{}", target))
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -356,14 +354,14 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
println!("image_src: {:?}, dst: {:?}", image_src, dst);
cp_r(&image_src, &dst);

let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=save-analysis-saved.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg(format!("--package-name={}-{}", name, target))
.arg(format!("--component-name=rust-analysis-{}", target))
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -471,13 +469,17 @@ pub fn rust_src(build: &Build) {
write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());

// Create plain source tarball
let tarball = rust_src_location(build);
let mut tarball = rust_src_location(build);
tarball.set_extension(""); // strip .gz
tarball.set_extension(""); // strip .tar
if let Some(dir) = tarball.parent() {
t!(fs::create_dir_all(dir));
}
let mut cmd = Command::new("tar");
cmd.arg("-czf").arg(sanitize_sh(&tarball))
.arg(&plain_name)
let mut cmd = rust_installer(build);
cmd.arg("tarball")
.arg("--input").arg(&plain_name)
.arg("--output").arg(&tarball)
.arg("--work-dir=.")
.current_dir(tmpdir(build));
build.run(&mut cmd);

Expand Down Expand Up @@ -521,14 +523,14 @@ pub fn rust_src(build: &Build) {
}

// Create source tarball in rust-installer format
let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=Awesome-Source.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg(format!("--package-name={}", name))
.arg("--component-name=rust-src")
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -622,15 +624,15 @@ pub fn cargo(build: &Build, stage: u32, target: &str) {
t!(t!(File::create(overlay.join("version"))).write_all(version.as_bytes()));

// Generate the installer tarball
let mut cmd = Command::new("sh");
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=Rust-is-ready-to-roll.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay)))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg("--non-installed-overlay").arg(&overlay)
.arg(format!("--package-name={}-{}", name, target))
.arg("--component-name=cargo")
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -671,15 +673,15 @@ pub fn rls(build: &Build, stage: u32, target: &str) {
t!(t!(File::create(overlay.join("version"))).write_all(version.as_bytes()));

// Generate the installer tarball
let mut cmd = Command::new("sh");
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
let mut cmd = rust_installer(build);
cmd.arg("generate")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=RLS-ready-to-serve.")
.arg(format!("--image-dir={}", sanitize_sh(&image)))
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay)))
.arg("--image-dir").arg(&image)
.arg("--work-dir").arg(&tmpdir(build))
.arg("--output-dir").arg(&distdir(build))
.arg("--non-installed-overlay").arg(&overlay)
.arg(format!("--package-name={}-{}", name, target))
.arg("--component-name=rls")
.arg("--legacy-manifest-dirs=rustlib,cargo");
Expand Down Expand Up @@ -730,29 +732,28 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
// upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
// the std files during uninstall. To do this ensure that rustc comes
// before rust-std in the list below.
let mut input_tarballs = format!("{},{},{},{},{},{}",
sanitize_sh(&rustc_installer),
sanitize_sh(&cargo_installer),
sanitize_sh(&rls_installer),
sanitize_sh(&analysis_installer),
sanitize_sh(&docs_installer),
sanitize_sh(&std_installer));
let mut tarballs = vec![rustc_installer, cargo_installer, rls_installer,
analysis_installer, docs_installer, std_installer];
if target.contains("pc-windows-gnu") {
input_tarballs.push_str(",");
input_tarballs.push_str(&sanitize_sh(&mingw_installer));
tarballs.push(mingw_installer);
}
let mut input_tarballs = tarballs[0].as_os_str().to_owned();
for tarball in &tarballs[1..] {
input_tarballs.push(",");
input_tarballs.push(tarball);
}

let mut cmd = Command::new(SH_CMD);
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/combine-installers.sh")))
let mut cmd = rust_installer(build);
cmd.arg("combine")
.arg("--product-name=Rust")
.arg("--rel-manifest-dir=rustlib")
.arg("--success-message=Rust-is-ready-to-roll.")
.arg(format!("--work-dir={}", sanitize_sh(&work)))
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
.arg("--work-dir").arg(&work)
.arg("--output-dir").arg(&distdir(build))
.arg(format!("--package-name={}-{}", pkgname(build, "rust"), target))
.arg("--legacy-manifest-dirs=rustlib,cargo")
.arg(format!("--input-tarballs={}", input_tarballs))
.arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay)));
.arg("--input-tarballs").arg(input_tarballs)
.arg("--non-installed-overlay").arg(&overlay);
build.run(&mut cmd);

let mut license = String::new();
Expand Down
7 changes: 5 additions & 2 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ impl Build {
// compiled with debuginfo.
if mode != Mode::Tool {
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string())
.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string())
.env("RUSTC_FORCE_UNSTABLE", "1");
}

// Enable usage of unstable features
Expand Down Expand Up @@ -524,7 +525,9 @@ impl Build {
// the comipiler, libs, and tests are stable and we don't want to make
// their deps unstable (since this would break the first invariant
// above).
if mode != Mode::Tool {
//
// FIXME: remove this after next stage0
if mode != Mode::Tool && stage == 0 {
cargo.env("RUSTBUILD_UNSTABLE", "1");
}

Expand Down
Loading