Remove rustc_session::config::Config
The wrapper type led to tons of target.target across the compiler. Its ptr_width field isn't required any more, as target_pointer_width is already present in parsed form.
This commit is contained in:
parent
4fa5578774
commit
d683e3ac23
5 changed files with 12 additions and 24 deletions
|
@ -34,11 +34,6 @@ use std::iter::{self, FromIterator};
|
|||
use std::path::{Path, PathBuf};
|
||||
use std::str::{self, FromStr};
|
||||
|
||||
pub struct Config {
|
||||
pub target: Target,
|
||||
pub ptr_width: u32,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
#[derive(Default, Encodable, Decodable)]
|
||||
pub struct SanitizerSet: u8 {
|
||||
|
@ -831,7 +826,7 @@ pub fn build_configuration(sess: &Session, mut user_cfg: CrateConfig) -> CrateCo
|
|||
user_cfg
|
||||
}
|
||||
|
||||
pub fn build_target_config(opts: &Options, target_override: Option<Target>) -> Config {
|
||||
pub fn build_target_config(opts: &Options, target_override: Option<Target>) -> Target {
|
||||
let target_result = target_override.map_or_else(|| Target::search(&opts.target_triple), Ok);
|
||||
let target = target_result.unwrap_or_else(|e| {
|
||||
early_error(
|
||||
|
@ -855,9 +850,7 @@ pub fn build_target_config(opts: &Options, target_override: Option<Target>) -> C
|
|||
)
|
||||
}
|
||||
|
||||
let ptr_width = target.pointer_width;
|
||||
|
||||
Config { target, ptr_width }
|
||||
target
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue