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 29 pull requests #38499

Merged
merged 106 commits into from
Dec 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
c470d4a
Add borrow support for slice binary search methods.
christophebiocca Nov 14, 2016
9976f5f
Add missing doc examples for SocketAddr struct
GuillaumeGomez Dec 8, 2016
7fe17f9
Add doc examples for UnixStream
GuillaumeGomez Dec 8, 2016
c35b9f6
Add UnixListener doc examples
GuillaumeGomez Dec 8, 2016
a78a33c
Add Incoming doc examples
GuillaumeGomez Dec 8, 2016
ef09db0
Point out the known type when field doesn't satisfy bound
estebank Dec 4, 2016
90c5b71
compiletest: A more verbose matching failure for mir tests
bluss Dec 10, 2016
f09e2cc
Expand E0309 explanation with motivating example
jonhoo Dec 12, 2016
8323185
minor fix about visibility in reference
liigo Dec 7, 2016
e095c71
Associated items and variants inherit visibility from their traits an…
liigo Dec 13, 2016
16d4b7b
doc: Explain meaning of Result iters and link to factory functions.
sourcefrog Dec 3, 2016
60fbe7a
Add missing Duration examples
GuillaumeGomez Dec 13, 2016
cf56c1f
Indicate `BTreeSet` in docs is code-like.
frewsxcv Dec 7, 2016
5c13041
review comments
estebank Dec 12, 2016
868fb03
When cast needs a dereference point at full cast
estebank Dec 8, 2016
ae36934
Document how `BTreeSet` iterator structures are created.
frewsxcv Dec 7, 2016
4c4e8c4
Simplify `BTreeSet::iter` doc example.
frewsxcv Dec 7, 2016
8cd3081
rustdoc: a formatting nit
tshepang Dec 15, 2016
c49e317
rustbuild: Stop building docs for libtest by default
ollie27 Dec 15, 2016
897cf9b
Add prefix to config.toml
jackpot51 Dec 15, 2016
58b94bd
Update config.toml.example
jackpot51 Dec 15, 2016
2938e6a
Add missing doc examples for UnixDatagram
GuillaumeGomez Dec 8, 2016
87b4071
Definitions: Split out NodeId <-> DefIndex mapping
michaelwoerister Dec 13, 2016
8e34a8e
Definitions: Extract DefPath interning into its own data structure.
michaelwoerister Dec 14, 2016
aed0cdb
definitions: Don't allocate DefIds for inlined HIR
michaelwoerister Dec 16, 2016
ed5a88e
definitions: Store DefPath data in separate table in metadata
michaelwoerister Dec 16, 2016
e0d2629
definitions: Add some timing stats for DefPathTable decoding.
michaelwoerister Dec 16, 2016
ea733b5
No need to store Definitions in RefCell within HIR map
michaelwoerister Dec 16, 2016
72f95aa
Move retrace_path() implementation to DefPathTable
michaelwoerister Dec 16, 2016
70944c2
No need to have tcx::opt_def_path() now that we store all DefPaths
michaelwoerister Dec 16, 2016
45571f3
definitions: Add some documentation.
michaelwoerister Dec 17, 2016
77e659a
Remove some more things that were only needed for inlined-HIR DefIds
michaelwoerister Dec 17, 2016
dd0fc0a
Disconnect ar from cc on OpenBSD
semarie Dec 17, 2016
18ff641
Minor fix in the merge_sort comments
Dec 17, 2016
9f8c1e2
disable run-pass/backtrace for openbsd
semarie Dec 17, 2016
a7d9025
let BSD to use gmake for GNU-make
semarie Dec 17, 2016
2c39ee1
OpenBSD has two stdc++ libraries: use the newer
semarie Dec 18, 2016
86fc63e
Implement `fmt::Debug` for all structures in libstd.
frewsxcv Nov 25, 2016
b35c306
Fix the path resolutions of glob imports.
jseyfried Dec 2, 2016
83ab9f7
Remove some unused functions and fix formatting.
jseyfried Nov 29, 2016
59de7f8
Add `ident.unhygienize()` and use `Ident` more instead of `Name` in `…
jseyfried Nov 29, 2016
aa19274
De-genericize `try_define`.
jseyfried Nov 29, 2016
532b013
Rename `ModuleS` -> `ModuleData`.
jseyfried Nov 26, 2016
4d638fd
Canonicalize lifetime names.
jseyfried Nov 26, 2016
e80d1a8
Remove `MacroDef`'s fields `imported_from` and `allow_internal_unstab…
jseyfried Nov 29, 2016
421c5d1
Remove scope placeholders, remove method `add_macro` of `ext::base::R…
jseyfried Dec 1, 2016
6f040b4
Avoid including attributes in bang macro invocations.
jseyfried Dec 1, 2016
745ddf2
Refactor out `mark.as_placeholder_id()`.
jseyfried Dec 1, 2016
dcae8bf
Give extern crates' root modules a better name.
jseyfried Dec 6, 2016
bd85a6d
target spec: add an asm-args field to pass arguments to the external ..
Dec 19, 2016
5049ad2
From<[u16; 8]> for Ipv6Addr.
Dec 2, 2016
3a82b0d
Don't try get local DefId of imported macro in rustdoc.
michaelwoerister Dec 19, 2016
488359e
travis: Fix the cargotest bot
alexcrichton Dec 19, 2016
cae98ca
travis: Support local sccache if not on bots
alexcrichton Dec 19, 2016
8e61ff2
Optimize `ast::PathSegment`.
jseyfried Dec 10, 2016
51f25b3
resolve: clean up diagnostics for name conflicts.
jseyfried Dec 12, 2016
8d9ba29
Minor bugfix for macro invocation path resolution.
jseyfried Dec 12, 2016
39e6ae2
Clean up `get_traits_containing_item`.
jseyfried Dec 14, 2016
f705c69
Simplify `TyCtxt::create_and_enter`.
jseyfried Dec 15, 2016
2dc2f5f
Bump version to 1.16
brson Dec 19, 2016
0a014c6
Move prefix to [install] section
jackpot51 Dec 19, 2016
228e495
Remove trailing whitespace
jackpot51 Dec 20, 2016
f5e7d92
rustbuild: Update Cargo download location
alexcrichton Dec 19, 2016
e1d8806
Fix closure debuginfo.
ahicks92 Dec 20, 2016
54f75c9
Add regression test for #38458
est31 Dec 20, 2016
73877a0
Find FileCheck using llvm-config
sanxiyn Dec 20, 2016
46d74ea
rustbuild: only plan from build triple for dist
xen0n Dec 19, 2016
8e38b2d
rustbuild: package src only once for build triple
xen0n Dec 19, 2016
57cf2ab
rustbuild: Deny and fix warnings
alexcrichton Dec 20, 2016
49546cc
rustbuild: Actually test musl on the musl bot
alexcrichton Dec 20, 2016
70ef94d
rustbuild: Run debuginfo tests by default
alexcrichton Dec 19, 2016
fe0d092
Indicate that `BTreeSet::iter` returns values in ascending order.
frewsxcv Dec 7, 2016
7fe44f7
Rollup merge of #37761 - christophebiocca:borrow-stdlib-fn-refactor, …
alexcrichton Dec 20, 2016
68dd6fd
Rollup merge of #38006 - frewsxcv:libstd-debug, r=alexcrichton
alexcrichton Dec 20, 2016
65e9691
Rollup merge of #38131 - clarcharr:from_segments, r=alexcrichton
alexcrichton Dec 20, 2016
2fb2d30
Rollup merge of #38150 - estebank:fix-23286, r=nikomatsakis
alexcrichton Dec 20, 2016
58d58c2
Rollup merge of #38158 - sourcefrog:doc-iter, r=GuillaumeGomez
alexcrichton Dec 20, 2016
551cb06
Rollup merge of #38171 - jseyfried:cleanup, r=nrc
alexcrichton Dec 20, 2016
b070feb
Rollup merge of #38208 - frewsxcv:btreesetdocs, r=alexcrichton
alexcrichton Dec 20, 2016
70e1275
Rollup merge of #38215 - liigo:patch-12, r=petrochenkov
alexcrichton Dec 20, 2016
4cfb2b4
Rollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcv
alexcrichton Dec 20, 2016
2f4ca4e
Rollup merge of #38245 - estebank:cast-deref-hint-2, r=nikomatsakis
alexcrichton Dec 20, 2016
dfa9948
Rollup merge of #38289 - bluss:mir-verbose-test-fail, r=michaelwoerister
alexcrichton Dec 20, 2016
a7710ef
Rollup merge of #38315 - jonhoo:better-E0309, r=pnkfelix
alexcrichton Dec 20, 2016
adfafff
Rollup merge of #38346 - GuillaumeGomez:duration_doc, r=frewsxcv
alexcrichton Dec 20, 2016
0874149
Rollup merge of #38388 - redox-os:config_toml_prefix, r=alexcrichton
alexcrichton Dec 20, 2016
55b8660
Rollup merge of #38395 - tshepang:nit, r=steveklabnik
alexcrichton Dec 20, 2016
2104111
Rollup merge of #38398 - ollie27:patch-1, r=alexcrichton
alexcrichton Dec 20, 2016
21f33db
Rollup merge of #38418 - michaelwoerister:def_path_cleanup, r=eddyb
alexcrichton Dec 20, 2016
a8e7f95
Rollup merge of #38432 - stjepang:fix-sort-comment, r=bluss
alexcrichton Dec 20, 2016
60842c1
Rollup merge of #38451 - semarie:openbsd-rustbuild, r=alexcrichton
alexcrichton Dec 20, 2016
cade120
Rollup merge of #38463 - japaric:asm-args, r=alexcrichton
alexcrichton Dec 20, 2016
6e2a901
Rollup merge of #38468 - xen0n:tarball-wrangling, r=alexcrichton
alexcrichton Dec 20, 2016
1509155
Rollup merge of #38470 - alexcrichton:really-fix-osx, r=brson
alexcrichton Dec 20, 2016
da73b4e
Rollup merge of #38471 - alexcrichton:run-debuginfo-tests, r=brson
alexcrichton Dec 20, 2016
6737f1a
Rollup merge of #38472 - alexcrichton:fix-cargotest, r=brson
alexcrichton Dec 20, 2016
802784d
Rollup merge of #38478 - brson:bump, r=alexcrichton
alexcrichton Dec 20, 2016
10bb4a4
Rollup merge of #38486 - est31:master, r=petrochenkov
alexcrichton Dec 20, 2016
c188635
Rollup merge of #38493 - sanxiyn:filecheck, r=alexcrichton
alexcrichton Dec 20, 2016
00fdc0c
Rollup merge of #38498 - alexcrichton:actually-test-musl, r=brson
alexcrichton Dec 20, 2016
7b8cbbe
Merge branch 'rustbuild-warnings' of https://github.com/alexcrichton/…
alexcrichton Dec 20, 2016
6b8dda5
Merge branch 'local-sccache' of https://github.com/alexcrichton/rust …
alexcrichton Dec 20, 2016
5f1ecb0
Merge branch 'fix_closure_debuginfo' of https://github.com/camlorn/ru…
alexcrichton Dec 20, 2016
0cf7d5d
Merge branch 'rfc_1560_warning_cycle' of https://github.com/jseyfried…
alexcrichton Dec 20, 2016
214a6c6
Fix compile errors and such
alexcrichton Dec 20, 2016
d5f1c6e
Merge remote-tracking branch 'origin/master' into rollup
alexcrichton Dec 20, 2016
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 mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
######################################################################

# The version number
CFG_RELEASE_NUM=1.15.0
CFG_RELEASE_NUM=1.16.0

# An optional number to put after the label, e.g. '.2' -> '-beta.2'
# NB Make sure it starts with a dot to conform to semver pre-release
Expand Down
1 change: 1 addition & 0 deletions src/Cargo.lock

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

2 changes: 2 additions & 0 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
//! switching compilers for the bootstrap and for build scripts will probably
//! never get replaced.

#![deny(warnings)]

extern crate bootstrap;

use std::env;
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
//!
//! See comments in `src/bootstrap/rustc.rs` for more information.

#![deny(warnings)]

extern crate bootstrap;

use std::env;
Expand Down
22 changes: 9 additions & 13 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def verify(path, sha_path, verbose):
with open(path, "rb") as f:
found = hashlib.sha256(f.read()).hexdigest()
with open(sha_path, "r") as f:
expected, _ = f.readline().split()
expected = f.readline().split()[0]
verified = found == expected
if not verified:
print("invalid checksum:\n"
Expand Down Expand Up @@ -146,7 +146,7 @@ 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_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):
Expand Down Expand Up @@ -179,21 +179,17 @@ 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()
channel = self.stage0_cargo_channel()
filename = "cargo-{}-{}.tar.gz".format(channel, self.build)
url = "https://static.rust-lang.org/cargo-dist/" + self.stage0_cargo_date()
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)
if not os.path.exists(tarball):
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
with open(self.cargo_stamp(), 'w') as f:
f.write(self.stage0_cargo_date())
f.write(self.stage0_cargo_rev())

def stage0_cargo_date(self):
return self._cargo_date

def stage0_cargo_channel(self):
return self._cargo_channel
def stage0_cargo_rev(self):
return self._cargo_rev

def stage0_rustc_date(self):
return self._rustc_date
Expand All @@ -217,7 +213,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_date() != f.read()
return self.stage0_cargo_rev() != f.read()

def bin_root(self):
return os.path.join(self.build_dir, self.build, "stage0")
Expand Down Expand Up @@ -469,7 +465,7 @@ def main():

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

start_time = time()

Expand Down
4 changes: 3 additions & 1 deletion src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//! This file implements the various regression test suites that we execute on
//! our CI.

extern crate build_helper;

use std::collections::HashSet;
use std::env;
use std::fmt;
Expand Down Expand Up @@ -543,7 +545,7 @@ pub fn distcheck(build: &Build) {
build.run(&mut cmd);
build.run(Command::new("./configure")
.current_dir(&dir));
build.run(Command::new("make")
build.run(Command::new(build_helper::make(&build.config.build))
.arg("check")
.current_dir(&dir));
}
12 changes: 12 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ pub struct Target {
#[derive(RustcDecodable, Default)]
struct TomlConfig {
build: Option<Build>,
install: Option<Install>,
llvm: Option<Llvm>,
rust: Option<Rust>,
target: Option<HashMap<String, TomlTarget>>,
Expand All @@ -135,6 +136,12 @@ struct Build {
python: Option<String>,
}

/// TOML representation of various global install decisions.
#[derive(RustcDecodable, Default, Clone)]
struct Install {
prefix: Option<String>,
}

/// TOML representation of how the LLVM build is configured.
#[derive(RustcDecodable, Default)]
struct Llvm {
Expand Down Expand Up @@ -258,6 +265,10 @@ impl Config {
set(&mut config.submodules, build.submodules);
set(&mut config.vendor, build.vendor);

if let Some(ref install) = toml.install {
config.prefix = install.prefix.clone();
}

if let Some(ref llvm) = toml.llvm {
match llvm.ccache {
Some(StringOrBool::String(ref s)) => {
Expand All @@ -275,6 +286,7 @@ impl Config {
set(&mut config.llvm_version_check, llvm.version_check);
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
}

if let Some(ref rust) = toml.rust {
set(&mut config.rust_debug_assertions, rust.debug_assertions);
set(&mut config.rust_debuginfo, rust.debuginfo);
Expand Down
8 changes: 8 additions & 0 deletions src/bootstrap/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
# Indicate whether the vendored sources are used for Rust dependencies or not
#vendor = false

# =============================================================================
# General install configuration options
# =============================================================================
[install]

# Instead of installing to /usr/local, install to this path instead.
#prefix = "/path/to/install"

# =============================================================================
# Options for compiling Rust code itself
# =============================================================================
Expand Down
8 changes: 7 additions & 1 deletion src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,14 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
}

/// Creates the `rust-src` installer component and the plain source tarball
pub fn rust_src(build: &Build) {
pub fn rust_src(build: &Build, host: &str) {
println!("Dist src");

if host != build.config.build {
println!("\tskipping, not a build host");
return
}

let plain_name = format!("rustc-{}-src", package_vers(build));
let name = format!("rust-src-{}", package_vers(build));
let image = tmpdir(build).join(format!("{}-image", name));
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ To learn more about a subcommand, run `./x.py <command> -h`

Flags {
verbose: m.opt_count("v"),
stage: m.opt_str("stage").map(|j| j.parse().unwrap()),
stage: stage,
keep_stage: m.opt_str("keep-stage").map(|j| j.parse().unwrap()),
build: m.opt_str("build").unwrap_or_else(|| {
env::var("BUILD").unwrap()
Expand Down
5 changes: 4 additions & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
//! More documentation can be found in each respective module below, and you can
//! also check out the `src/bootstrap/README.md` file for more information.

#![deny(warnings)]

extern crate build_helper;
extern crate cmake;
extern crate filetime;
Expand Down Expand Up @@ -721,7 +723,8 @@ impl Build {
fn llvm_filecheck(&self, target: &str) -> PathBuf {
let target_config = self.config.target_config.get(target);
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
s.parent().unwrap().join(exe("FileCheck", target))
let llvm_bindir = output(Command::new(s).arg("--bindir"));
Path::new(llvm_bindir.trim()).join(exe("FileCheck", target))
} else {
let base = self.llvm_out(&self.config.build).join("build");
let exe = exe("FileCheck", target);
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/mk/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ tidy:
check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu:
$(Q)$(BOOTSTRAP) test --target arm-linux-androideabi
check-stage2-T-x86_64-unknown-linux-musl-H-x86_64-unknown-linux-gnu:
$(Q)$(BOOTSTRAP) test --target x86_64-unknown-linux-gnu
$(Q)$(BOOTSTRAP) test --target x86_64-unknown-linux-musl


.PHONY: dist
2 changes: 1 addition & 1 deletion src/bootstrap/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub fn check(build: &mut Build) {
// Externally configured LLVM requires FileCheck to exist
let filecheck = build.llvm_filecheck(&build.config.build);
if !filecheck.starts_with(&build.out) && !filecheck.exists() && build.config.codegen_tests {
panic!("filecheck executable {:?} does not exist", filecheck);
panic!("FileCheck executable {:?} does not exist", filecheck);
}

for target in build.config.target.iter() {
Expand Down
21 changes: 16 additions & 5 deletions src/bootstrap/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,16 +267,18 @@ pub fn build_rules(build: &Build) -> Rules {
// nothing to do for debuginfo tests
} else if build.config.build.contains("apple") {
rules.test("check-debuginfo", "src/test/debuginfo")
.default(true)
.dep(|s| s.name("libtest"))
.dep(|s| s.name("tool-compiletest").host(s.host))
.dep(|s| s.name("tool-compiletest").target(s.host))
.dep(|s| s.name("test-helpers"))
.dep(|s| s.name("debugger-scripts"))
.run(move |s| check::compiletest(build, &s.compiler(), s.target,
"debuginfo-lldb", "debuginfo"));
} else {
rules.test("check-debuginfo", "src/test/debuginfo")
.default(true)
.dep(|s| s.name("libtest"))
.dep(|s| s.name("tool-compiletest").host(s.host))
.dep(|s| s.name("tool-compiletest").target(s.host))
.dep(|s| s.name("test-helpers"))
.dep(|s| s.name("debugger-scripts"))
.run(move |s| check::compiletest(build, &s.compiler(), s.target,
Expand Down Expand Up @@ -455,7 +457,7 @@ pub fn build_rules(build: &Build) -> Rules {
for (krate, path, default) in krates("test_shim") {
rules.doc(&krate.doc_step, path)
.dep(|s| s.name("libtest"))
.default(default && build.config.docs)
.default(default && build.config.compiler_docs)
.run(move |s| doc::test(build, s.stage, s.target));
}
for (krate, path, default) in krates("rustc-main") {
Expand Down Expand Up @@ -496,7 +498,7 @@ pub fn build_rules(build: &Build) -> Rules {
rules.dist("dist-src", "src")
.default(true)
.host(true)
.run(move |_| dist::rust_src(build));
.run(move |s| dist::rust_src(build, s.target));
rules.dist("dist-docs", "src/doc")
.default(true)
.dep(|s| s.name("default:doc"))
Expand Down Expand Up @@ -820,7 +822,16 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
let hosts = if self.build.flags.host.len() > 0 {
&self.build.flags.host
} else {
&self.build.config.host
if kind == Kind::Dist {
// For 'dist' steps we only distribute artifacts built from
// the build platform, so only consider that in the hosts
// array.
// NOTE: This relies on the fact that the build triple is
// always placed first, as done in `config.rs`.
&self.build.config.host[..1]
} else {
&self.build.config.host
}
};
let targets = if self.build.flags.target.len() > 0 {
&self.build.flags.target
Expand Down
12 changes: 12 additions & 0 deletions src/build_helper/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
None
} else if target.contains("musl") {
Some(PathBuf::from("ar"))
} else if target.contains("openbsd") {
Some(PathBuf::from("ar"))
} else {
let parent = cc.parent().unwrap();
let file = cc.file_name().unwrap().to_str().unwrap();
Expand All @@ -61,6 +63,16 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> {
}
}

pub fn make(host: &str) -> PathBuf {
if host.contains("bitrig") || host.contains("dragonfly") ||
host.contains("freebsd") || host.contains("netbsd") ||
host.contains("openbsd") {
PathBuf::from("gmake")
} else {
PathBuf::from("make")
}
}

pub fn output(cmd: &mut Command) -> String {
let output = match cmd.stderr(Stdio::inherit()).output() {
Ok(status) => status,
Expand Down
14 changes: 11 additions & 3 deletions src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,23 @@ docker \
mkdir -p $HOME/.cargo
mkdir -p $root_dir/obj

args=
if [ "$SCCACHE_BUCKET" != "" ]; then
args="$args --env SCCACHE_BUCKET=$SCCACHE_BUCKET"
args="$args --env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID"
args="$args --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
else
mkdir -p $HOME/.cache/sccache
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"
fi

exec docker \
run \
--volume "$root_dir:/checkout:ro" \
--volume "$root_dir/obj:/checkout/obj" \
--workdir /checkout/obj \
--env SRC=/checkout \
--env SCCACHE_BUCKET=$SCCACHE_BUCKET \
--env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
$args \
--env CARGO_HOME=/cargo \
--env LOCAL_USER_ID=`id -u` \
--volume "$HOME/.cargo:/cargo" \
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/x86_64-gnu-cargotest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ccache \
libssl-dev \
sudo \
xz-utils
xz-utils \
pkg-config

ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
Expand Down
3 changes: 2 additions & 1 deletion src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,8 @@ of an item to see whether it should be allowed or not. This is where privacy
warnings are generated, or otherwise "you used a private item of another module
and weren't allowed to."

By default, everything in Rust is *private*, with one exception. Enum variants
By default, everything in Rust is *private*, with two exceptions: Associated
items in a `pub` Trait are public by default; Enum variants
in a `pub` enum are also public by default. When an item is declared as `pub`,
it can be thought of as being accessible to the outside world. For example:

Expand Down
2 changes: 1 addition & 1 deletion src/liballoc_jemalloc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn main() {
cmd.arg(format!("--build={}", build_helper::gnu_target(&host)));

run(&mut cmd);
let mut make = Command::new("make");
let mut make = Command::new(build_helper::make(&host));
make.current_dir(&build_dir)
.arg("build_lib_static");

Expand Down
Loading