Add support for enumerated settings.
The EnumSetting objects can take one of 256 named values.
This commit is contained in:
@@ -4,10 +4,22 @@ Cretonne shared settings.
|
||||
This module defines settings are are relevant for all code generators.
|
||||
"""
|
||||
|
||||
from . import SettingGroup, BoolSetting
|
||||
from . import SettingGroup, BoolSetting, EnumSetting
|
||||
|
||||
group = SettingGroup('shared')
|
||||
|
||||
enable_simd = BoolSetting("Enable the use of SIMD instructions", default=True)
|
||||
opt_level = EnumSetting(
|
||||
"""
|
||||
Optimization level:
|
||||
|
||||
- default: Very profitable optimizations enabled, none slow.
|
||||
- best: Enable all optimizations
|
||||
- fastest: Optimize for compile time by disabling most optimizations.
|
||||
""",
|
||||
'default', 'best', 'fastest')
|
||||
|
||||
enable_simd = BoolSetting(
|
||||
"""Enable the use of SIMD instructions.""",
|
||||
default=True)
|
||||
|
||||
group.close(globals())
|
||||
|
||||
Reference in New Issue
Block a user