Skip to content

Commit

Permalink
auto merge of #18410 : thestinger/rust/revert-parallel, r=alexcrichton
Browse files Browse the repository at this point in the history
This reverts commit c245c5b.

Parallel code generation generates invalid code for librand, which is
caught by recent versions of binutils.
  • Loading branch information
bors committed Oct 29, 2014
2 parents 1652a1f + 79723a3 commit 1effc9e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
7 changes: 0 additions & 7 deletions mk/main.mk
Expand Up @@ -157,13 +157,6 @@ RUSTFLAGS_STAGE1 += -C prefer-dynamic
# by not emitting them.
RUSTFLAGS_STAGE0 += -Z no-landing-pads

# Go fast for stage0, and also for stage1/stage2 if optimization is off.
RUSTFLAGS_STAGE0 += -C codegen-units=4
ifdef CFG_DISABLE_OPTIMIZE
RUSTFLAGS_STAGE1 += -C codegen-units=4
RUSTFLAGS_STAGE2 += -C codegen-units=4
endif

# platform-specific auto-configuration
include $(CFG_SRC_DIR)mk/platform.mk

Expand Down
4 changes: 0 additions & 4 deletions mk/tests.mk
Expand Up @@ -633,10 +633,6 @@ CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS))
ifndef CFG_DISABLE_OPTIMIZE_TESTS
CTEST_RUSTC_FLAGS += -O
endif
# Force codegen-units=1 for compiletest tests. compiletest does its own
# parallelization internally, so rustc's default codegen-units=2 will actually
# slow things down.
CTEST_RUSTC_FLAGS += -C codegen-units=1


CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
Expand Down
15 changes: 1 addition & 14 deletions src/librustc/driver/config.rs
Expand Up @@ -780,20 +780,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
early_warn("the --crate-file-name argument has been renamed to \
--print-file-name");
}

let mut cg = build_codegen_options(matches);

if cg.codegen_units == 0 {
match opt_level {
// `-C lto` doesn't work with multiple codegen units.
_ if cg.lto => cg.codegen_units = 1,

No | Less => cg.codegen_units = 2,
Default | Aggressive => cg.codegen_units = 1,
}
}
let cg = cg;

let cg = build_codegen_options(matches);

if !cg.remark.is_empty() && debuginfo == NoDebugInfo {
early_warn("-C remark will not show source locations without --debuginfo");
Expand Down

0 comments on commit 1effc9e

Please sign in to comment.