Skip to content

Rollup of 15 pull requests #39613

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
wants to merge 37 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
108293d
Added Default impl to PathBuf
Jan 1, 2017
6d9f359
Add i686-unknown-netbsdelf target
jakllsch Jan 23, 2017
5c9fdd1
doc comment rewording
king6cong Feb 3, 2017
e866d07
lint/ctypes: Don't warn on non-unsized structs with PhantomData.
emilio Feb 2, 2017
8579218
Improve error message for uninferrable types #38812
cengiz-io Jan 24, 2017
89ae2ca
Remove extra newlines from expectation files
cengiz-io Jan 24, 2017
7aff6ad
Remove extra note and revert name in message
cengiz-io Jan 25, 2017
3fa28cb
Add a new ui test and update existing ones
cengiz-io Feb 2, 2017
380ba6d
go back to use //
king6cong Feb 6, 2017
7c8c45e
Extract collections benchmarks to libcollections/benches
phungleson Feb 6, 2017
b975786
regr test
nikomatsakis Feb 6, 2017
78f542b
Rename i686-unknown-netbsdelf target to i686-unknown-netbsd
jakllsch Feb 6, 2017
fa0a728
back: Limit the number of LLVM worker threads.
michaelwoerister Feb 6, 2017
4f5fc4e
fix case where some edges can't be recreated by expanding the graph
nikomatsakis Feb 6, 2017
7c2752a
rustbuild: support setting verbosity in config.toml
Keruspe Feb 6, 2017
1ee88e5
A few documentation improvements for `syntax::print::pp`
bjorn3 Feb 5, 2017
4268872
rustbuild: add verbose to config.toml.example
Keruspe Feb 6, 2017
19bbd85
Fix branch name Cargo's downloaded from
alexcrichton Feb 5, 2017
bf126d2
Fix a manifest-generation bug on beta
alexcrichton Feb 6, 2017
235741f
liblibc: Update to include aarch64-unknown-freebsd support
dumbbell Feb 6, 2017
ddb0a78
Unignore u128 test for stage 0,1
est31 Feb 7, 2017
df73bc9
Fix ICE when accessing mutably an immutable enum
estebank Feb 6, 2017
c9eaa66
Rollup merge of #38764 - Aaronepower:master, r=aturon
frewsxcv Feb 7, 2017
c125b88
Rollup merge of #39361 - cengizIO:master, r=arielb1
frewsxcv Feb 7, 2017
fae92d8
Rollup merge of #39426 - jakllsch:netbsd-c, r=alexcrichton
frewsxcv Feb 7, 2017
9995b13
Rollup merge of #39462 - emilio:improper-ctypes, r=nikomatsakis
frewsxcv Feb 7, 2017
76f8873
Rollup merge of #39482 - king6cong:master, r=frewsxcv
frewsxcv Feb 7, 2017
cf7fbb7
Rollup merge of #39557 - bjorn3:pp-docs, r=jseyfried
frewsxcv Feb 7, 2017
2762b4d
Rollup merge of #39561 - phungleson:libcollectionsbench, r=alexcrichton
frewsxcv Feb 7, 2017
763d342
Rollup merge of #39582 - nikomatsakis:incr-comp-issue-39569, r=michae…
frewsxcv Feb 7, 2017
0deb522
Rollup merge of #39583 - michaelwoerister:limit-llvm-threads, r=nikom…
frewsxcv Feb 7, 2017
b5e4745
Rollup merge of #39587 - Keruspe:master, r=alexcrichton
frewsxcv Feb 7, 2017
985b050
Rollup merge of #39598 - alexcrichton:cargo-branch, r=brson
frewsxcv Feb 7, 2017
35ec4ba
Rollup merge of #39599 - alexcrichton:cargo-tarball-name, r=brson
frewsxcv Feb 7, 2017
20e2e0e
Rollup merge of #39601 - dumbbell:update-liblibc-to-include-aarch64-u…
frewsxcv Feb 7, 2017
cfaedd2
Rollup merge of #39602 - estebank:fix-39544, r=eddyb
frewsxcv Feb 7, 2017
9d5dbeb
Rollup merge of #39604 - est31:i128_tests, r=alexcrichton
frewsxcv Feb 7, 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
12 changes: 8 additions & 4 deletions src/librustc_trans/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use errors::emitter::Emitter;
use syntax_pos::MultiSpan;
use context::{is_pie_binary, get_reloc_model};

use std::cmp;
use std::ffi::CString;
use std::fs;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -754,10 +755,13 @@ pub fn run_passes(sess: &Session,
}

// Process the work items, optionally using worker threads.
// NOTE: This code is not really adapted to incremental compilation where
// the compiler decides the number of codegen units (and will
// potentially create hundreds of them).
let num_workers = work_items.len() - 1;
// NOTE: We are hardcoding a limit of worker threads for now. With
// incremental compilation we can run into situations where we would
// open hundreds of threads otherwise -- which can make things slower
// if things don't fit into memory anymore, or can cause the compiler
// to crash because of too many open file handles. See #39280 for
// some discussion on how to improve this in the future.
let num_workers = cmp::min(work_items.len() - 1, 32);
if num_workers <= 1 {
run_work_singlethreaded(sess, &trans.exported_symbols, work_items);
} else {
Expand Down