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 11 pull requests #59513

Merged
merged 31 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8b8488c
bootstrap: build compiler-builtins with -Z emit-stack-sizes
japaric Mar 24, 2019
7d365cf
compile all crates under test w/ -Zemit-stack-sizes
japaric Mar 25, 2019
c764890
musl: build toolchain libs with -fPIC
mati865 Mar 27, 2019
c6e3ea4
Visit path in `walk_mac`
varkor Mar 25, 2019
41316f0
Combine all builtin late lints
Zoxc Jan 31, 2019
cd32f9b
Remove LintSession and run incremental and whole crate lints in parallel
Zoxc Jan 31, 2019
dee389f
Run module lint passes in parallel
Zoxc Jan 31, 2019
e9a8bef
Remove unnecessary with_globals calls
Zoxc Mar 28, 2019
8dbae79
Use write_all instead of write in example code
mbrubeck Mar 28, 2019
d9bdd01
Stablize {f32,f64}::copysign().
crlf0710 Mar 28, 2019
9f14e14
deny duplicate matcher bindings by default
mark-i-m Mar 24, 2019
3ba7454
Use track_errors
JohnTitor Mar 21, 2019
526b355
Remove err_count
JohnTitor Mar 22, 2019
ee0e1b7
Set ok value
JohnTitor Mar 22, 2019
0e76b34
WIP: remove report_as_error
JohnTitor Mar 24, 2019
f0de8e8
Return correct values
JohnTitor Mar 24, 2019
6c8e3a5
Remove unused variable
JohnTitor Mar 24, 2019
0778847
Use ErrorReported
JohnTitor Mar 28, 2019
17a8aff
Use `SmallVec` in `TokenStreamBuilder`.
nnethercote Mar 28, 2019
93fb4d8
Fix missed fn rename in #59284
Mar 29, 2019
8794e21
Rollup merge of #58019 - Zoxc:combine-late-lints, r=estebank
Centril Mar 29, 2019
97927da
Rollup merge of #59358 - JohnTitor:use-track-errors, r=oli-obk
Centril Mar 29, 2019
f9262af
Rollup merge of #59394 - mark-i-m:dup-matcher-bindings-2, r=Centril
Centril Mar 29, 2019
3df97f9
Rollup merge of #59401 - japaric:compiler-builtins-stack-sizes, r=ale…
Centril Mar 29, 2019
0f4c87c
Rollup merge of #59423 - varkor:walk_mac-visit_path, r=petrochenkov
Centril Mar 29, 2019
c2d6c08
Rollup merge of #59468 - mati865:musl_toolchain, r=pnkfelix
Centril Mar 29, 2019
73f9832
Rollup merge of #59476 - nnethercote:TokenStreamBuilder-SmallVec, r=p…
Centril Mar 29, 2019
bf3e6c6
Rollup merge of #59496 - Zoxc:fix-globals, r=oli-obk
Centril Mar 29, 2019
0494cff
Rollup merge of #59498 - mbrubeck:write_all, r=Centril
Centril Mar 29, 2019
18680ae
Rollup merge of #59503 - crlf0710:stablize_copysign, r=SimonSapin
Centril Mar 29, 2019
456fa39
Rollup merge of #59511 - jethrogb:jb/maybeinit-deprecated, r=Centril
Centril Mar 29, 2019
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
27 changes: 27 additions & 0 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,33 @@ fn main() {
cmd.arg("-C").arg(format!("debug-assertions={}", debug_assertions));
}

// Build all crates in the `std` facade with `-Z emit-stack-sizes` to add stack usage
// information.
//
// When you use this `-Z` flag with Cargo you get stack usage information on all crates
// compiled from source, and when you are using LTO you also get information on pre-compiled
// crates like `core` and `std`, even if they were not compiled with `-Z emit-stack-sizes`.
// However, there's an exception: `compiler_builtins`. This crate is special and doesn't
// participate in LTO because it's always linked as a separate object file. For this reason
// it's impossible to get stack usage information about `compiler-builtins` using
// `RUSTFLAGS` + Cargo, or `cargo rustc`.
//
// To make the stack usage information of all crates under the `std` facade available to
// Cargo based stack usage analysis tools, in both LTO and non-LTO mode, we compile them
// with the `-Z emit-stack-sizes` flag. The `RUSTC_EMIT_STACK_SIZES` var helps us apply this
// flag only to the crates in the `std` facade. The `-Z` flag is known to currently work
// with targets that produce ELF files so we limit its use flag to those targets.
//
// NOTE(japaric) if this ever causes problem with an LLVM upgrade or any PR feel free to
// remove it or comment it out
if env::var_os("RUSTC_EMIT_STACK_SIZES").is_some()
&& (target.contains("-linux-")
|| target.contains("-none-eabi")
|| target.ends_with("-none-elf"))
{
cmd.arg("-Zemit-stack-sizes");
}

if let Ok(s) = env::var("RUSTC_CODEGEN_UNITS") {
cmd.arg("-C").arg(format!("codegen-units={}", s));
}
Expand Down
4 changes: 4 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ impl Step for Std {
let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage));
builder.info(&format!("Building stage{} std artifacts ({} -> {})", compiler.stage,
&compiler.host, target));
// compile with `-Z emit-stack-sizes`; see bootstrap/src/rustc.rs for more details
cargo.env("RUSTC_EMIT_STACK_SIZES", "1");
run_cargo(builder,
&mut cargo,
&libstd_stamp(builder, compiler, target),
Expand Down Expand Up @@ -382,6 +384,8 @@ impl Step for Test {
let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage));
builder.info(&format!("Building stage{} test artifacts ({} -> {})", compiler.stage,
&compiler.host, target));
// compile with `-Z emit-stack-sizes`; see bootstrap/src/rustc.rs for more details
cargo.env("RUSTC_EMIT_STACK_SIZES", "1");
run_cargo(builder,
&mut cargo,
&libtest_stamp(builder, compiler, target),
Expand Down
4 changes: 4 additions & 0 deletions src/ci/docker/scripts/musl-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ TARGET=$ARCH-linux-musl
OUTPUT=/usr/local
shift

# Ancient binutils versions don't understand debug symbols produced by more recent tools.
# Apparently applying `-fPIC` everywhere allows them to link successfully.
export CFLAGS="-fPIC $CFLAGS"

git clone https://github.com/richfelker/musl-cross-make -b v0.9.7
cd musl-cross-make

Expand Down
3 changes: 2 additions & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ declare_lint! {

declare_lint! {
pub DUPLICATE_MATCHER_BINDING_NAME,
Warn,
Deny,
"duplicate macro matcher binding name"
}

Expand Down Expand Up @@ -464,6 +464,7 @@ impl LintPass for HardwiredLints {
DEPRECATED_IN_FUTURE,
AMBIGUOUS_ASSOCIATED_ITEMS,
NESTED_IMPL_TRAIT,
DUPLICATE_MATCHER_BINDING_NAME,
)
}
}
Expand Down
Loading