Add support for setting presets.
Fixes #11. Presets are groups of settings and values applied at once. This is used as a shorthand in test files, so for example "isa intel nehalem" enables all of the CPUID bits that the Nehalem micro-architecture provides.
This commit is contained in:
@@ -41,7 +41,7 @@ pub fn parse_options<'a, I>(iter: I, config: &mut Configurable, loc: &Location)
|
||||
for opt in iter.map(TestOption::new) {
|
||||
match opt {
|
||||
TestOption::Flag(name) => {
|
||||
match config.set_bool(name, true) {
|
||||
match config.enable(name) {
|
||||
Ok(_) => {}
|
||||
Err(SetError::BadName) => return err!(loc, "unknown flag '{}'", opt),
|
||||
Err(_) => return err!(loc, "not a boolean flag: '{}'", opt),
|
||||
|
||||
@@ -609,7 +609,7 @@ impl<'a> Parser<'a> {
|
||||
// would slow down normal compilation, but when we're reading IL from a text file we're
|
||||
// either testing or debugging Cretonne, and verification makes sense.
|
||||
flag_builder
|
||||
.set_bool("enable_verifier", true)
|
||||
.enable("enable_verifier")
|
||||
.expect("Missing enable_verifier setting");
|
||||
|
||||
while let Some(Token::Identifier(command)) = self.token() {
|
||||
|
||||
Reference in New Issue
Block a user