1
Fork 0

Change cfg parsers to produce symbols instead of strings.

This commit is contained in:
Nicholas Nethercote 2023-10-30 14:01:33 +11:00
parent bfcff7933e
commit 8e4ac980fd
4 changed files with 16 additions and 54 deletions

View file

@ -26,8 +26,8 @@ use rustc_session::{build_session, getopts, Session};
use rustc_session::{CompilerIO, EarlyErrorHandler};
use rustc_span::edition::{Edition, DEFAULT_EDITION};
use rustc_span::symbol::sym;
use rustc_span::FileName;
use rustc_span::SourceFileHashAlgorithm;
use rustc_span::{FileName, Symbol};
use rustc_target::spec::{CodeModel, LinkerFlavorCli, MergeFunctions, PanicStrategy, RelocModel};
use rustc_target::spec::{RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TlsModel};
use std::collections::{BTreeMap, BTreeSet};
@ -38,7 +38,7 @@ use std::sync::Arc;
fn mk_session(
handler: &mut EarlyErrorHandler,
matches: getopts::Matches,
) -> (Session, Cfg<String>) {
) -> (Session, Cfg<Symbol>) {
let registry = registry::Registry::new(&[]);
let sessopts = build_session_options(handler, &matches);
let cfg = parse_cfg(handler, matches.opt_strs("cfg"));