Check for + and - in the target features set
This commit is contained in:
1 parent
a672c68f03
commit
c4a8af0f0d
1 file changed
+12
@@ -2093,7 +2093,19 @@ gb_internal bool check_target_feature_is_enabled(String const &feature, String *
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
String str = string_split_iterator(&it, ',');
|
String str = string_split_iterator(&it, ',');
|
||||||
if (str == "") break;
|
if (str == "") break;
|
||||||
|
|
||||||
if (!string_set_exists(&build_context.target_features_set, str)) {
|
if (!string_set_exists(&build_context.target_features_set, str)) {
|
||||||
|
String plus_str = concatenate_strings(temporary_allocator(), make_string_c("+"), str);
|
||||||
|
|
||||||
|
if (!string_set_exists(&build_context.target_features_set, plus_str)) {
|
||||||
|
if (not_enabled) *not_enabled = str;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String minus_str = concatenate_strings(temporary_allocator(), make_string_c("-"), str);
|
||||||
|
|
||||||
|
if (string_set_exists(&build_context.target_features_set, minus_str)) {
|
||||||
if (not_enabled) *not_enabled = str;
|
if (not_enabled) *not_enabled = str;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user