]> git.lizzy.rs Git - rust.git/commitdiff
Revert "enable parallel codegen by default"
authorDaniel Micay <danielmicay@gmail.com>
Wed, 29 Oct 2014 00:09:24 +0000 (20:09 -0400)
committerDaniel Micay <danielmicay@gmail.com>
Wed, 29 Oct 2014 00:14:00 +0000 (20:14 -0400)
This reverts commit c245c5bbad10923b47c9f66d5f0da2913ef11a38.

Parallel code generation generates invalid code for librand, which is
caught by recent versions of binutils.

mk/main.mk
mk/tests.mk
src/librustc/driver/config.rs

index e927f6ad468fa0cc8e3f9f31ad57071d59cab72d..cd08228978e15daf0f4db59268f5a4dd12ed7520 100644 (file)
@@ -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
 
index 3bbd871e5be77a1757a250b1ff8b10c121a805bc..45b618cb75841f007d3214c9fb562ac899b03011 100644 (file)
@@ -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) := \
index d6798d59ecb3d90424016d6d29b4cbf7e10d924a..1f44808275f6cf961913060b9978dd79f75b87c7 100644 (file)
@@ -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");