Skip to content

Commit 1effc9e

Browse files
committed
auto merge of #18410 : thestinger/rust/revert-parallel, r=alexcrichton
This reverts commit c245c5b. Parallel code generation generates invalid code for librand, which is caught by recent versions of binutils.
2 parents 1652a1f + 79723a3 commit 1effc9e

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

mk/main.mk

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,6 @@ RUSTFLAGS_STAGE1 += -C prefer-dynamic
157157
# by not emitting them.
158158
RUSTFLAGS_STAGE0 += -Z no-landing-pads
159159

160-
# Go fast for stage0, and also for stage1/stage2 if optimization is off.
161-
RUSTFLAGS_STAGE0 += -C codegen-units=4
162-
ifdef CFG_DISABLE_OPTIMIZE
163-
RUSTFLAGS_STAGE1 += -C codegen-units=4
164-
RUSTFLAGS_STAGE2 += -C codegen-units=4
165-
endif
166-
167160
# platform-specific auto-configuration
168161
include $(CFG_SRC_DIR)mk/platform.mk
169162

mk/tests.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,10 +633,6 @@ CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS))
633633
ifndef CFG_DISABLE_OPTIMIZE_TESTS
634634
CTEST_RUSTC_FLAGS += -O
635635
endif
636-
# Force codegen-units=1 for compiletest tests. compiletest does its own
637-
# parallelization internally, so rustc's default codegen-units=2 will actually
638-
# slow things down.
639-
CTEST_RUSTC_FLAGS += -C codegen-units=1
640636

641637

642638
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \

src/librustc/driver/config.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -780,20 +780,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
780780
early_warn("the --crate-file-name argument has been renamed to \
781781
--print-file-name");
782782
}
783-
784-
let mut cg = build_codegen_options(matches);
785-
786-
if cg.codegen_units == 0 {
787-
match opt_level {
788-
// `-C lto` doesn't work with multiple codegen units.
789-
_ if cg.lto => cg.codegen_units = 1,
790-
791-
No | Less => cg.codegen_units = 2,
792-
Default | Aggressive => cg.codegen_units = 1,
793-
}
794-
}
795-
let cg = cg;
796-
783+
let cg = build_codegen_options(matches);
797784

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

0 commit comments

Comments
 (0)