diff --git a/.gitmodules b/.gitmodules index 984113151de4d..2b72ca91c8899 100644 --- a/.gitmodules +++ b/.gitmodules @@ -36,8 +36,8 @@ url = https://github.com/rust-lang/edition-guide.git [submodule "src/llvm-project"] path = src/llvm-project - url = https://github.com/rust-lang/llvm-project.git - branch = rustc/11.0-2020-10-12 + url = https://github.com/est31/llvm-project.git + branch = rustc/11.0-2020-11-14 [submodule "src/doc/embedded-book"] path = src/doc/embedded-book url = https://github.com/rust-embedded/book.git diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 443a490e342d5..23b435941625e 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -149,7 +149,7 @@ impl Step for Rustc { target, cargo_subcommand(builder.kind), ); - rustc_cargo(builder, &mut cargo, target); + rustc_cargo(builder, &mut cargo, target, compiler); if let Subcommand::Check { all_targets: true, .. } = builder.config.cmd { cargo.arg("--all-targets"); } @@ -215,7 +215,7 @@ impl Step for CodegenBackend { cargo .arg("--manifest-path") .arg(builder.src.join(format!("compiler/rustc_codegen_{}/Cargo.toml", backend))); - rustc_cargo_env(builder, &mut cargo, target); + rustc_cargo_env(builder, &mut cargo, target, compiler); run_cargo( builder, diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index ed9b91085863f..bd29c597d1667 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -499,7 +499,7 @@ impl Step for Rustc { }); let mut cargo = builder.cargo(compiler, Mode::Rustc, SourceType::InTree, target, "build"); - rustc_cargo(builder, &mut cargo, target); + rustc_cargo(builder, &mut cargo, target, compiler); builder.info(&format!( "Building stage{} compiler artifacts ({} -> {})", @@ -522,16 +522,16 @@ impl Step for Rustc { } } -pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection) { +pub fn rustc_cargo(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection, compiler: Compiler) { cargo .arg("--features") .arg(builder.rustc_features()) .arg("--manifest-path") .arg(builder.src.join("compiler/rustc/Cargo.toml")); - rustc_cargo_env(builder, cargo, target); + rustc_cargo_env(builder, cargo, target, compiler); } -pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection) { +pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelection, compiler: Compiler) { // Set some configuration variables picked up by build scripts and // the compiler alike cargo @@ -561,7 +561,11 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetS if builder.config.rust_verify_llvm_ir { cargo.env("RUSTC_VERIFY_LLVM_IR", "1"); } - + if target == "x86_64-unknown-linux-gnu" && compiler.stage > 0 { + if builder.is_rust_llvm(target) { + cargo.rustflag("-Ctarget-cpu=x86-64-v3"); + } + } // Pass down configuration from the LLVM build into the build of // rustc_llvm and rustc_codegen_llvm. // @@ -701,7 +705,7 @@ impl Step for CodegenBackend { cargo .arg("--manifest-path") .arg(builder.src.join(format!("compiler/rustc_codegen_{}/Cargo.toml", backend))); - rustc_cargo_env(builder, &mut cargo, target); + rustc_cargo_env(builder, &mut cargo, target, compiler); let tmp_stamp = out_dir.join(".tmp.stamp"); diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index aa670bd9a2e0c..afd63591e50b8 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -527,7 +527,7 @@ impl Step for Rustc { cargo.rustdocflag("--document-private-items"); cargo.rustdocflag("--enable-index-page"); cargo.rustdocflag("-Zunstable-options"); - compile::rustc_cargo(builder, &mut cargo, target); + compile::rustc_cargo(builder, &mut cargo, target, compiler); // Only include compiler crates, no dependencies of those, such as `libc`. cargo.arg("--no-deps"); diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 5a73f58304501..2fbd4f6bf7aec 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1732,7 +1732,7 @@ impl Step for Crate { } Mode::Rustc => { builder.ensure(compile::Rustc { compiler, target }); - compile::rustc_cargo(builder, &mut cargo, target); + compile::rustc_cargo(builder, &mut cargo, target, compiler); } _ => panic!("can only test libraries"), }; diff --git a/src/llvm-project b/src/llvm-project index ee1617457899e..aa2ac653b1b38 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit ee1617457899ef2eb55dcf7ee2758b4340b6533f +Subproject commit aa2ac653b1b38e9dd27ad6a6a9711af5ca7a569e