From 00874e39ad3748f3a829ac8900700a37e07ba70d Mon Sep 17 00:00:00 2001 From: jakubtomsu <66876057+jakubtomsu@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:53:28 +0200 Subject: [PATCH] fix --- src/build_settings.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 8eed4c41a..006b0ea0a 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -2218,21 +2218,14 @@ gb_internal bool check_target_feature_is_enabled(String const &feature, String * String plus_str = concatenate_strings(temporary_allocator(), make_string_c("+"), feature_str); String minus_str = concatenate_strings(temporary_allocator(), make_string_c("-"), feature_str); - bool has_raw = string_set_exists(&build_context.target_features_set, str); + bool has_raw = string_set_exists(&build_context.target_features_set, feature_str); bool has_plus = string_set_exists(&build_context.target_features_set, plus_str); bool has_minus = string_set_exists(&build_context.target_features_set, minus_str); + // NOTE(jakubtomsu): this way "feature" and "+feature" is ALWAYS equivalent, + // and also allows the minus sign to do a final override. bool is_enabled = (has_plus || has_raw) && !has_minus; - if ((has_plus || has_raw) && has_minus) { - printf("ENTRIES for '%.*s' / '%.*s':\n", LIT(plus_str), LIT(minus_str)); - for (StringSetEntry& str : build_context.target_features_set) { - printf("\thash: %i, next: %i, val: %.*s\n", str.hash, str.next, LIT(str.value)); - } - } - - GB_ASSERT(!((has_plus || has_raw) && has_minus)); - if (want_enabled != is_enabled) { if (not_enabled) *not_enabled = str; return false;