Index: Source/build/scripts/make_runtime_features.py |
diff --git a/Source/build/scripts/make_runtime_features.py b/Source/build/scripts/make_runtime_features.py |
index 0160b4ce3d5d3c09ce427b30fafcf65452917fb9..37fb09c891767590199bc2008707d1d4b7f8508a 100755 |
--- a/Source/build/scripts/make_runtime_features.py |
+++ b/Source/build/scripts/make_runtime_features.py |
@@ -43,7 +43,7 @@ class RuntimeFeatureWriter(in_generator.Writer): |
# FIXME: valid_values and defaults should probably roll into one object. |
valid_values = { |
- 'status': ['stable', 'experimental', 'test'], |
+ 'status': ['stable', 'experimental', 'test', 'deprecated'], |
} |
defaults = { |
'condition' : None, |
@@ -52,6 +52,10 @@ class RuntimeFeatureWriter(in_generator.Writer): |
'status': None, |
} |
+ _status_aliases = { |
+ 'deprecated': 'test', |
+ } |
+ |
def __init__(self, in_file_path): |
super(RuntimeFeatureWriter, self).__init__(in_file_path) |
self._outputs = {(self.class_name + '.h'): self.generate_header, |
@@ -62,6 +66,7 @@ class RuntimeFeatureWriter(in_generator.Writer): |
# Make sure the resulting dictionaries have all the keys we expect. |
for feature in self._features: |
feature['first_lowered_name'] = lower_first(feature['name']) |
+ feature['status'] = self._status_aliases.get(feature['status'], feature['status']) |
# Most features just check their isFooEnabled bool |
# but some depend on more than one bool. |
enabled_condition = 'is%sEnabled' % feature['name'] |
@@ -73,7 +78,7 @@ class RuntimeFeatureWriter(in_generator.Writer): |
def _feature_sets(self): |
# Another way to think of the status levels is as "sets of features" |
# which is how we're referring to them in this generator. |
- return self.valid_values['status'] |
+ return [status for status in self.valid_values['status'] if status not in self._status_aliases] |
@template_expander.use_jinja(class_name + '.h.tmpl', filters=filters) |
def generate_header(self): |