diff options
| author | bors <bors@rust-lang.org> | 2019-03-18 11:28:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-03-18 11:28:12 +0000 |
| commit | 0f88167f89fffe321590c5148f21b7d51d44388d (patch) | |
| tree | e73770f15b22930f5ee5bef204ae72bf13efa840 /src/bootstrap | |
| parent | cd45b19bd2d8b4f9a3940a409ea43285019f3280 (diff) | |
| parent | 0e0488fa53ddc465139023c023957a70176f34e2 (diff) | |
| download | rust-0f88167f89fffe321590c5148f21b7d51d44388d.tar.gz rust-0f88167f89fffe321590c5148f21b7d51d44388d.zip | |
Auto merge of #58847 - bjorn3:remove_metadata_only_cg, r=alexcrichton
Remove metadata only codegen backend It is unused and probably broken at the moment.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 5 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 9 | ||||
| -rw-r--r-- | src/bootstrap/test.rs | 8 | ||||
| -rw-r--r-- | src/bootstrap/tool.rs | 2 |
4 files changed, 8 insertions, 16 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index daa6749f87f..414033a5e2f 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -996,10 +996,7 @@ impl<'a> Builder<'a> { // For other crates, however, we know that we've already got a standard // library up and running, so we can use the normal compiler to compile // build scripts in that situation. - // - // If LLVM support is disabled we need to use the snapshot compiler to compile - // build scripts, as the new compiler doesn't support executables. - if mode == Mode::Std || !self.config.llvm_enabled { + if mode == Mode::Std { cargo .env("RUSTC_SNAPSHOT", &self.initial_rustc) .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_snapshot_libdir()); diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index d20958854ed..6162c7e0a37 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -64,7 +64,6 @@ pub struct Config { pub backtrace_on_ice: bool, // llvm codegen options - pub llvm_enabled: bool, pub llvm_assertions: bool, pub llvm_optimize: bool, pub llvm_thin_lto: bool, @@ -244,7 +243,6 @@ struct Install { #[derive(Deserialize, Default)] #[serde(deny_unknown_fields, rename_all = "kebab-case")] struct Llvm { - enabled: Option<bool>, ccache: Option<StringOrBool>, ninja: Option<bool>, assertions: Option<bool>, @@ -360,7 +358,6 @@ impl Config { pub fn default_opts() -> Config { let mut config = Config::default(); - config.llvm_enabled = true; config.llvm_optimize = true; config.llvm_version_check = true; config.backtrace = true; @@ -512,7 +509,6 @@ impl Config { Some(StringOrBool::Bool(false)) | None => {} } set(&mut config.ninja, llvm.ninja); - set(&mut config.llvm_enabled, llvm.enabled); llvm_assertions = llvm.assertions; set(&mut config.llvm_optimize, llvm.optimize); set(&mut config.llvm_thin_lto, llvm.thin_lto); @@ -671,6 +667,11 @@ impl Config { pub fn very_verbose(&self) -> bool { self.verbose > 1 } + + pub fn llvm_enabled(&self) -> bool { + self.rust_codegen_backends.contains(&INTERNER.intern_str("llvm")) + || self.rust_codegen_backends.contains(&INTERNER.intern_str("emscripten")) + } } fn set<T>(field: &mut T, val: Option<T>) { diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 81e09bc878a..8a9d99c1662 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1194,7 +1194,7 @@ impl Step for Compiletest { cmd.arg("--quiet"); } - if builder.config.llvm_enabled { + if builder.config.llvm_enabled() { let llvm_config = builder.ensure(native::Llvm { target: builder.config.build, emscripten: false, @@ -1227,12 +1227,6 @@ impl Step for Compiletest { } } } - if suite == "run-make-fulldeps" && !builder.config.llvm_enabled { - builder.info( - "Ignoring run-make test suite as they generally don't work without LLVM" - ); - return; - } if suite != "run-make-fulldeps" { cmd.arg("--cc") diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 9dbcacf7026..865b1f8268c 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -700,7 +700,7 @@ impl<'a> Builder<'a> { } fn llvm_bin_path(&self) -> Option<PathBuf> { - if self.config.llvm_enabled { + if self.config.llvm_enabled() { let llvm_config = self.ensure(native::Llvm { target: self.config.build, emscripten: false, |
