aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYhya Ibrahim <yhyamobile57@gmail.com>2025-10-11 15:48:12 +0300
committerYhya Ibrahim <yhyamobile57@gmail.com>2025-10-11 15:48:12 +0300
commitc4a8af0f0d2d8c5d052f075df524f10b67306730 (patch)
tree696ee54207744c1db39e6fc202170245e1445517 /src
parenta672c68f03223efcab8f487d1bef05edaf5cf266 (diff)
Check for `+` and `-` in the target features set
Diffstat (limited to 'src')
-rw-r--r--src/build_settings.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 53953600e..694ba1142 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -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;
}