mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 05:20:28 +00:00
Check for + and - in the target features set
This commit is contained in:
@@ -2093,7 +2093,19 @@ gb_internal bool check_target_feature_is_enabled(String const &feature, String *
|
||||
for (;;) {
|
||||
String str = string_split_iterator(&it, ',');
|
||||
if (str == "") break;
|
||||
|
||||
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;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user