Skip to content

Fix extended bootstrap issues with OpenSSL on NetBSD build hosts #44320

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
80e3f89
Add blanket TryFrom impl when From is implemented.
jimmycuadra Aug 30, 2017
b0edfce
Implement TryFrom explicitly for infallible numeric conversions.
jimmycuadra Aug 30, 2017
414ee9a
Remove test case that assumes FromStr provides TryFrom<&'a str>.
jimmycuadra Aug 30, 2017
36c0ff8
Reword docs for Infallible to make them easier to understand.
jimmycuadra Sep 1, 2017
93a56cd
impl From<Infallible> for TryFromIntError.
jimmycuadra Sep 1, 2017
e9f01bc
Added a way to retrieve the key out of a HashMap when it's being repl…
Binero Sep 2, 2017
f65bb2a
Manuall rebase of @Migi pull/41336
Eh2406 Sep 3, 2017
9a547fc
get ci green
Eh2406 Sep 3, 2017
a312b47
Marked `Entry::replace` as unstable.
Binero Sep 3, 2017
d3de465
Addressed @BurntSuchi's remarks regarding Entry::replace
Binero Sep 12, 2017
732dd2f
Missing trailing newline
Eh2406 Sep 12, 2017
b91bac2
readd test
Eh2406 Sep 14, 2017
5f6de3d
Derive additional traits for Infallible.
jimmycuadra Sep 19, 2017
2c78bb4
Add --all flag to ./x.py clean
tommyip Sep 20, 2017
09d90e5
Do not show "available paths" help in ./x.py clean
tommyip Sep 20, 2017
cfc711e
fix version number
Eh2406 Sep 21, 2017
2adeba6
update xsv to head
Eh2406 Sep 21, 2017
9562981
impl std::error::Error for convert::Infallible.
jimmycuadra Sep 22, 2017
79f2439
Impl fmt::Display for convert::Infallible.
jimmycuadra Sep 22, 2017
e64efc9
Add support for `..=` syntax
durka Sep 19, 2017
4737c5a
Substitute `...` with the expanded form
Badel2 Sep 20, 2017
7aabf57
Add information about the syntax used in ranges
Badel2 Sep 21, 2017
54c4a83
dotdoteq_in_patterns feature gate
Badel2 Sep 21, 2017
15fa85c
extract explicit_predicates_of
Sep 23, 2017
1c589b7
TrustedRandomAccess specialisation for Cloned.
Sep 23, 2017
f94bd36
add aarch64-unknown-linux-musl target
bcressey Sep 5, 2017
99c0c52
docs improvement std::sync::{PoisonError, TryLockError}
lorepozo Sep 23, 2017
4d2a8c5
Simplify implementation of Display and Error for convert::Infallible.
jimmycuadra Sep 24, 2017
ba74a86
Add back mistakenly removed numeric conversions.
jimmycuadra Sep 24, 2017
bc43e17
Add doc example to HashMap::hasher
napen123 Sep 23, 2017
ddee9fb
Point at parameter type on E0301
estebank Sep 23, 2017
874124b
Backport libs stabilizations to 1.21 beta
dtolnay Sep 25, 2017
d5d41f2
Add missing links in fmt module
GuillaumeGomez Sep 25, 2017
3db0094
Improve wording for StepBy
steveklabnik Sep 25, 2017
20d4c0f
Move src/librustc_mir/transform/nll.rs to a subdirectory
SimonSapin Sep 25, 2017
9c3fa4d
Point at signature on unused lint
estebank Sep 25, 2017
f7fd04a
docs improvement sync::atomic::Atomic*
lorepozo Sep 25, 2017
13724fa
Add more custom folding to `core::iter` adaptors
cuviper Sep 26, 2017
9e35b79
rustc: Default 32 codegen units at O0
alexcrichton Sep 25, 2017
3730dfd
impl Trait in argument position desugaring:
mdevlamynck Sep 26, 2017
e58f528
merge fixes, addressing CR comments
gaurikholkar Sep 11, 2017
aa6f0c8
modify message for return time having multiple lifetimes
gaurikholkar Sep 11, 2017
bbf82be
tidy fix
gaurikholkar Sep 11, 2017
d7bb575
use present tense consistently and update references
nikomatsakis Sep 12, 2017
9e4649e
remove random newlines from error messages, fix compile-fail test
nikomatsakis Sep 12, 2017
4bbb58d
remove error code description
gaurikholkar Sep 23, 2017
5c59bba
minor fixes
gaurikholkar Sep 24, 2017
73543d5
fix test reference
nikomatsakis Sep 26, 2017
34d36c0
mir-borrowck: Add borrow data parameter to `report_illegal_mutation_o…
zilbuz Sep 24, 2017
e28c73d
mir-borrowck: Add span labels to `report_illegal_mutation_of_borrowed()`
zilbuz Sep 24, 2017
838105f
Use a different error code to avoid conflicts
mdevlamynck Sep 26, 2017
5102309
bump rustfmt
Badel2 Sep 26, 2017
b683538
mir-borrowck: Edit compile-fail tests with E0506 error to also test o…
zilbuz Sep 26, 2017
6d4989b
Add span label to E0384 for MIR borrowck
KiChjang Sep 24, 2017
0e6f4cf
Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
bors Sep 27, 2017
b53b853
bootstrap: use shasum(1) on NetBSD build hosts
jakllsch Aug 31, 2017
90aa66b
bootstrap: use tar -z on extract
jakllsch Aug 31, 2017
cde47ce
Remove DepNodeIndex::new is already impl for Idx
spastorino Sep 27, 2017
70c3a3d
Remove DepNodeIndexNew::new and ::index, they are already impl for Idx
spastorino Sep 27, 2017
e0e14c9
Remove SerializedDepNodeIndex::new it is already impl for Idx
spastorino Sep 27, 2017
0f97b6b
Apply attr proc macros before cfg processing
tmnilsson Sep 12, 2017
2bd104f
Impl Try for Option
huntiep Jun 8, 2017
f098d7b
Add tests for Option and Result Try impl
huntiep Jun 8, 2017
8f63e8d
Add docs for Missing, correct Option's Try test
huntiep Jun 8, 2017
28996db
Rename option::Missing to NoneError
huntiep Jun 18, 2017
e30d92b
Add UI tests
huntiep Sep 22, 2017
44d5090
Auto merge of #44782 - estebank:issue-36700, r=GuillaumeGomez
bors Sep 27, 2017
c5cad5a
Update RLS and Rustfmt
nrc Sep 22, 2017
c0ea270
Rename rls component to rls-preview on nightly
nrc Sep 22, 2017
bfcb290
Add RLS and Rustfmt to the toolstate mechanism
nrc Sep 22, 2017
71a0be0
Update the RLS again
nrc Sep 25, 2017
9b91b87
Update the Cargo submodule
alexcrichton Sep 27, 2017
041d355
Update some minor dependencies
alexcrichton Sep 27, 2017
9cb90f4
Auto merge of #44779 - tjkirch:master, r=alexcrichton
bors Sep 28, 2017
20fc215
Normalize spaces in lang attributes.
Havvy Sep 28, 2017
f22b9da
Auto merge of #44790 - clarcharr:zip_bytes, r=sfackler
bors Sep 28, 2017
d887369
Auto merge of #44806 - KiChjang:mir-err-notes-2, r=pnkfelix
bors Sep 28, 2017
7694ca4
Update to the `cc` crate
alexcrichton Sep 23, 2017
3457a22
ci: Fix building disabled containers
kallisti5 Sep 5, 2017
688a858
Auto merge of #44785 - alexcrichton:update-cargo, r=nikomatsakis
bors Sep 28, 2017
3c96d40
Auto merge of #44278 - Binero:master, r=BurntSushi
bors Sep 28, 2017
46ef620
Auto merge of #44528 - tmnilsson:attr_proc_macro_cfg_process, r=jseyf…
bors Sep 28, 2017
a379780
Auto merge of #44811 - zilbuz:issue-44596/E0506, r=arielb1
bors Sep 29, 2017
1a29e82
Remove conflicting TryFrom impls on 32-bit targets.
jimmycuadra Sep 29, 2017
0253d98
Auto merge of #44847 - estebank:unused-signature, r=nikomatsakis
bors Sep 29, 2017
d514263
Auto merge of #44853 - alexcrichton:debug-codegen-units, r=michaelwoe…
bors Sep 29, 2017
09ee9b7
Auto merge of #44856 - cuviper:more-fold, r=dtolnay
bors Sep 29, 2017
51cd061
Auto merge of #44866 - mdevlamynck:impl-trait, r=eddyb
bors Sep 29, 2017
6f87d20
Auto merge of #42526 - huntiep:try_opt, r=nikomatsakis
bors Sep 29, 2017
966cf33
Simplify implementation of From<Infallible> for TryFromIntError.
jimmycuadra Sep 29, 2017
27d95d3
Fix more TryFrom impls for integers.
jimmycuadra Sep 29, 2017
b7041bf
Auto merge of #44174 - jimmycuadra:try-from-infallible, r=sfackler
bors Sep 29, 2017
f407b2b
Rollup merge of #44124 - gaurikholkar:return_self, r=arielb1
Mark-Simulacrum Sep 29, 2017
f91c55e
Rollup merge of #44287 - Eh2406:master, r=aturon
Mark-Simulacrum Sep 29, 2017
20f892f
Rollup merge of #44320 - jakllsch:jakllsch-caf2c3d2-c939-4c4d-8c68-1a…
Mark-Simulacrum Sep 29, 2017
6bc8ca0
Rollup merge of #44694 - tommyip:make_clean, r=Mark-Simulacrum
Mark-Simulacrum Sep 29, 2017
8083877
Rollup merge of #44708 - toidiu:ak-44493, r=nikomatsakis
Mark-Simulacrum Sep 29, 2017
f2feb83
Rollup merge of #44794 - napen123:master, r=frewsxcv
Mark-Simulacrum Sep 29, 2017
b1437bc
Rollup merge of #44797 - lucasem:master, r=frewsxcv
Mark-Simulacrum Sep 29, 2017
570f1ce
Rollup merge of #44824 - dtolnay:22really21, r=alexcrichton
Mark-Simulacrum Sep 29, 2017
327cd0d
Rollup merge of #44836 - GuillaumeGomez:fmt-missing-links, r=QuietMis…
Mark-Simulacrum Sep 29, 2017
3d7a390
Rollup merge of #44840 - steveklabnik:fix-wording, r=BurntSushi
Mark-Simulacrum Sep 29, 2017
7c3d376
Rollup merge of #44845 - SimonSapin:nll_mod_rs, r=nikomatsakis
Mark-Simulacrum Sep 29, 2017
7756d39
Rollup merge of #44854 - lucasem:atomic-docs, r=steveklabnik
Mark-Simulacrum Sep 29, 2017
37c74e1
Rollup merge of #44889 - spastorino:remove_new, r=arielb1
Mark-Simulacrum Sep 29, 2017
4489a7a
Rollup merge of #44900 - Havvy:normalize-lang-attribute-spacing, r=sf…
Mark-Simulacrum Sep 29, 2017
d6451f0
Rollup merge of #44903 - kallisti5:ci-build-disabled, r=aidanhs
Mark-Simulacrum Sep 29, 2017
4491ea5
Auto merge of #44893 - spastorino:remove_new_and_index, r=nikomatsakis
bors Sep 30, 2017
c4cca3a
Auto merge of #44936 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors Sep 30, 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
445 changes: 233 additions & 212 deletions src/Cargo.lock

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ members = [
"tools/rls/test_data/infer_custom_bin",
"tools/rls/test_data/infer_lib",
"tools/rls/test_data/omit_init_build",
"tools/rls/test_data/unicødë",
"tools/rls/test_data/workspace_symbol",
]

# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
Expand All @@ -60,10 +62,5 @@ debug-assertions = false
[patch."https://github.com/rust-lang/cargo"]
cargo = { path = "tools/cargo" }

# Override rustfmt dependencies both on the repo and the crate (the RLS
# sometimes uses either).
# FIXME should only need the crates.io patch, long term.
[patch."https://github.com/rust-lang-nursery/rustfmt"]
rustfmt-nightly = { path = "tools/rustfmt" }
[patch.crates-io]
rustfmt-nightly = { path = "tools/rustfmt" }
2 changes: 1 addition & 1 deletion src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ cmake = "0.1.23"
filetime = "0.1"
num_cpus = "1.0"
getopts = "0.2"
gcc = "0.3.54"
cc = "1.0"
libc = "0.2"
serde = "1.0.8"
serde_derive = "1.0.8"
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/bin/sccache-plus-cl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

extern crate gcc;
extern crate cc;

use std::env;
use std::process::{self, Command};
Expand All @@ -18,7 +18,7 @@ fn main() {
// Locate the actual compiler that we're invoking
env::remove_var("CC");
env::remove_var("CXX");
let mut cfg = gcc::Build::new();
let mut cfg = cc::Build::new();
cfg.cargo_metadata(false)
.out_dir("/")
.target(&target)
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl<'a> Builder<'a> {
Subcommand::Bench { ref paths, .. } => (Kind::Bench, &paths[..]),
Subcommand::Dist { ref paths } => (Kind::Dist, &paths[..]),
Subcommand::Install { ref paths } => (Kind::Install, &paths[..]),
Subcommand::Clean => panic!(),
Subcommand::Clean { .. } => panic!(),
};

let builder = Builder {
Expand Down
10 changes: 5 additions & 5 deletions src/bootstrap/cc.rs → src/bootstrap/cc_detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//! 6. "cc"
//!
//! Some of this logic is implemented here, but much of it is farmed out to the
//! `gcc` crate itself, so we end up having the same fallbacks as there.
//! `cc` crate itself, so we end up having the same fallbacks as there.
//! Similar logic is then used to find a C++ compiler, just some s/cc/c++/ is
//! used.
//!
Expand All @@ -35,7 +35,7 @@ use std::process::Command;
use std::iter;

use build_helper::{cc2ar, output};
use gcc;
use cc;

use Build;
use config::Target;
Expand All @@ -45,7 +45,7 @@ pub fn find(build: &mut Build) {
// For all targets we're going to need a C compiler for building some shims
// and such as well as for being a linker for Rust code.
for target in build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) {
let mut cfg = gcc::Build::new();
let mut cfg = cc::Build::new();
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false)
.target(&target).host(&build.build);

Expand All @@ -67,7 +67,7 @@ pub fn find(build: &mut Build) {

// For all host triples we need to find a C++ compiler as well
for host in build.hosts.iter().cloned().chain(iter::once(build.build)) {
let mut cfg = gcc::Build::new();
let mut cfg = cc::Build::new();
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false).cpp(true)
.target(&host).host(&build.build);
let config = build.config.target_config.get(&host);
Expand All @@ -82,7 +82,7 @@ pub fn find(build: &mut Build) {
}
}

fn set_compiler(cfg: &mut gcc::Build,
fn set_compiler(cfg: &mut cc::Build,
gnu_compiler: &str,
target: Interned<String>,
config: Option<&Target>,
Expand Down
12 changes: 10 additions & 2 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ impl Step for Rls {

builder.add_rustc_lib_path(compiler, &mut cargo);

try_run(build, &mut cargo);
try_run_expecting(
build,
&mut cargo,
builder.build.config.toolstate.rls.passes(ToolState::Testing),
);
}
}

Expand Down Expand Up @@ -295,7 +299,11 @@ impl Step for Rustfmt {

builder.add_rustc_lib_path(compiler, &mut cargo);

try_run(build, &mut cargo);
try_run_expecting(
build,
&mut cargo,
builder.build.config.toolstate.rustfmt.passes(ToolState::Testing),
);
}
}

Expand Down
35 changes: 20 additions & 15 deletions src/bootstrap/clean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,37 @@
//! Responsible for cleaning out a build directory of all old and stale
//! artifacts to prepare for a fresh build. Currently doesn't remove the
//! `build/cache` directory (download cache) or the `build/$target/llvm`
//! directory as we want that cached between builds.
//! directory unless the --all flag is present.

use std::fs;
use std::io::{self, ErrorKind};
use std::path::Path;

use Build;

pub fn clean(build: &Build) {
pub fn clean(build: &Build, all: bool) {
rm_rf("tmp".as_ref());
rm_rf(&build.out.join("tmp"));
rm_rf(&build.out.join("dist"));

for host in &build.hosts {
let entries = match build.out.join(host).read_dir() {
Ok(iter) => iter,
Err(_) => continue,
};
if all {
rm_rf(&build.out);
} else {
rm_rf(&build.out.join("tmp"));
rm_rf(&build.out.join("dist"));

for entry in entries {
let entry = t!(entry);
if entry.file_name().to_str() == Some("llvm") {
continue
for host in &build.hosts {
let entries = match build.out.join(host).read_dir() {
Ok(iter) => iter,
Err(_) => continue,
};

for entry in entries {
let entry = t!(entry);
if entry.file_name().to_str() == Some("llvm") {
continue
}
let path = t!(entry.path().canonicalize());
rm_rf(&path);
}
let path = t!(entry.path().canonicalize());
rm_rf(&path);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def v(*args):
"arm-unknown-linux-musleabihf install directory")
v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root",
"armv7-unknown-linux-musleabihf install directory")
v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root",
"aarch64-unknown-linux-musl install directory")
v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs",
"rootfs in qemu testing, you probably don't want to use this")
v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs",
Expand Down
17 changes: 4 additions & 13 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,13 +1098,8 @@ impl Step for Rls {
.arg("--output-dir").arg(&distdir(build))
.arg("--non-installed-overlay").arg(&overlay)
.arg(format!("--package-name={}-{}", name, target))
.arg("--legacy-manifest-dirs=rustlib,cargo");

if build.config.channel == "nightly" {
cmd.arg("--component-name=rls");
} else {
cmd.arg("--component-name=rls-preview");
}
.arg("--legacy-manifest-dirs=rustlib,cargo")
.arg("--component-name=rls-preview");

build.run(&mut cmd);
distdir(build).join(format!("{}-{}.tar.gz", name, target))
Expand Down Expand Up @@ -1333,12 +1328,8 @@ impl Step for Extended {
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target))
.join(format!("rust-std-{}", target)),
&exe.join("rust-std"));
let rls_path = if build.config.channel == "nightly" {
work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls")
} else {
work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls-preview")
};
cp_r(&rls_path, &exe.join("rls"));
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls-preview"),
&exe.join("rls"));
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target))
.join(format!("rust-analysis-{}", target)),
&exe.join("rust-analysis"));
Expand Down
21 changes: 14 additions & 7 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ pub enum Subcommand {
paths: Vec<PathBuf>,
test_args: Vec<String>,
},
Clean,
Clean {
all: bool,
},
Dist {
paths: Vec<PathBuf>,
},
Expand Down Expand Up @@ -147,6 +149,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`");
opts.optmulti("", "test-args", "extra arguments", "ARGS");
},
"bench" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
"clean" => { opts.optflag("", "all", "clean all build artifacts"); },
_ => { },
};

Expand Down Expand Up @@ -250,17 +253,18 @@ Arguments:
}
});

// All subcommands can have an optional "Available paths" section
// All subcommands except `clean` can have an optional "Available paths" section
if matches.opt_present("verbose") {
let config = Config::parse(&["build".to_string()]);
let mut build = Build::new(config);
metadata::build(&mut build);

let maybe_rules_help = Builder::get_help(&build, subcommand.as_str());
extra_help.push_str(maybe_rules_help.unwrap_or_default().as_str());
} else {
extra_help.push_str(format!("Run `./x.py {} -h -v` to see a list of available paths.",
subcommand).as_str());
} else if subcommand.as_str() != "clean" {
extra_help.push_str(format!(
"Run `./x.py {} -h -v` to see a list of available paths.",
subcommand).as_str());
}

// User passed in -h/--help?
Expand Down Expand Up @@ -290,10 +294,13 @@ Arguments:
}
"clean" => {
if paths.len() > 0 {
println!("\nclean takes no arguments\n");
println!("\nclean does not take a path argument\n");
usage(1, &opts, &subcommand_help, &extra_help);
}
Subcommand::Clean

Subcommand::Clean {
all: matches.opt_present("all"),
}
}
"dist" => {
Subcommand::Dist {
Expand Down
16 changes: 8 additions & 8 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extern crate lazy_static;
extern crate serde_json;
extern crate cmake;
extern crate filetime;
extern crate gcc;
extern crate cc;
extern crate getopts;
extern crate num_cpus;
extern crate toml;
Expand All @@ -148,7 +148,7 @@ use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppresse

use util::{exe, libdir, OutputFolder, CiEnv};

mod cc;
mod cc_detect;
mod channel;
mod check;
mod clean;
Expand Down Expand Up @@ -241,9 +241,9 @@ pub struct Build {

// Runtime state filled in later on
// target -> (cc, ar)
cc: HashMap<Interned<String>, (gcc::Tool, Option<PathBuf>)>,
cc: HashMap<Interned<String>, (cc::Tool, Option<PathBuf>)>,
// host -> (cc, ar)
cxx: HashMap<Interned<String>, gcc::Tool>,
cxx: HashMap<Interned<String>, cc::Tool>,
crates: HashMap<Interned<String>, Crate>,
is_sudo: bool,
ci_env: CiEnv,
Expand Down Expand Up @@ -345,12 +345,12 @@ impl Build {
job::setup(self);
}

if let Subcommand::Clean = self.config.cmd {
return clean::clean(self);
if let Subcommand::Clean { all } = self.config.cmd {
return clean::clean(self, all);
}

self.verbose("finding compilers");
cc::find(self);
cc_detect::find(self);
self.verbose("running sanity check");
sanity::check(self);
// If local-rust is the same major.minor as the current version, then force a local-rebuild
Expand Down Expand Up @@ -619,7 +619,7 @@ impl Build {
/// specified.
fn cflags(&self, target: Interned<String>) -> Vec<String> {
// Filter out -O and /O (the optimization flags) that we picked up from
// gcc-rs because the build scripts will determine that for themselves.
// cc-rs because the build scripts will determine that for themselves.
let mut base = self.cc[&target].0.args().iter()
.map(|s| s.to_string_lossy().into_owned())
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
Expand Down
9 changes: 5 additions & 4 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use std::process::Command;

use build_helper::output;
use cmake;
use gcc;
use cc;

use Build;
use util;
Expand Down Expand Up @@ -289,7 +289,7 @@ impl Step for TestHelpers {
let _folder = build.fold_output(|| "build_test_helpers");
println!("Building test helpers");
t!(fs::create_dir_all(&dst));
let mut cfg = gcc::Build::new();
let mut cfg = cc::Build::new();

// We may have found various cross-compilers a little differently due to our
// extra configuration, so inform gcc of these compilers. Note, though, that
Expand Down Expand Up @@ -367,7 +367,7 @@ impl Step for Openssl {
if !ok {
panic!("failed to download openssl source")
}
let mut shasum = if target.contains("apple") {
let mut shasum = if target.contains("apple") || build.build.contains("netbsd") {
let mut cmd = Command::new("shasum");
cmd.arg("-a").arg("256");
cmd
Expand All @@ -387,7 +387,7 @@ impl Step for Openssl {
let dst = build.openssl_install_dir(target).unwrap();
drop(fs::remove_dir_all(&obj));
drop(fs::remove_dir_all(&dst));
build.run(Command::new("tar").arg("xf").arg(&tarball).current_dir(&out));
build.run(Command::new("tar").arg("zxf").arg(&tarball).current_dir(&out));

let mut configure = Command::new("perl");
configure.arg(obj.join("Configure"));
Expand All @@ -399,6 +399,7 @@ impl Step for Openssl {
let os = match &*target {
"aarch64-linux-android" => "linux-aarch64",
"aarch64-unknown-linux-gnu" => "linux-aarch64",
"aarch64-unknown-linux-musl" => "linux-aarch64",
"arm-linux-androideabi" => "android",
"arm-unknown-linux-gnueabi" => "linux-armv4",
"arm-unknown-linux-gnueabihf" => "linux-armv4",
Expand Down
Loading