[bootstrap] Remove llvm.enabled config
This commit is contained in:
parent
ca2ff089f3
commit
1c7d368ebe
@ -14,10 +14,6 @@
|
||||
# =============================================================================
|
||||
[llvm]
|
||||
|
||||
# Indicates whether rustc will support compilation with LLVM
|
||||
# note: rustc does not compile without LLVM at the moment
|
||||
#enabled = true
|
||||
|
||||
# Indicates whether the LLVM build is a Release or Debug build
|
||||
#optimize = true
|
||||
|
||||
|
@ -996,10 +996,7 @@ pub fn cargo(
|
||||
// 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());
|
||||
|
@ -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 @@ fn path_from_python(var_key: &str) -> PathBuf {
|
||||
|
||||
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 @@ pub fn parse(args: &[String]) -> 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 @@ pub fn verbose(&self) -> bool {
|
||||
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>) {
|
||||
|
@ -1194,7 +1194,7 @@ fn run(self, builder: &Builder<'_>) {
|
||||
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 @@ fn run(self, builder: &Builder<'_>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
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")
|
||||
|
@ -699,8 +699,8 @@ fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
|
||||
add_lib_path(lib_paths, cmd);
|
||||
}
|
||||
|
||||
fn llvm_bin_path(&self) -> Option<PathBuf> {
|
||||
if self.config.llvm_enabled {
|
||||
fn llvm_bin_path(&self) -> Option<PathBuf> {
|
||||
if self.config.llvm_enabled() {
|
||||
let llvm_config = self.ensure(native::Llvm {
|
||||
target: self.config.build,
|
||||
emscripten: false,
|
||||
|
Loading…
Reference in New Issue
Block a user