Honour no-thread-local for variables declared at procedure scope

This commit is contained in:
Spooky309
2026-05-16 10:56:17 +01:00
parent 80a21a01cc
commit 765776d136

View File

@@ -2260,7 +2260,9 @@ gb_internal void check_value_decl_stmt(CheckerContext *ctx, Ast *node, u32 mod_f
error(e->token, "'thread_local' variables cannot be declared within a defer statement");
}
}
e->Variable.thread_local_model = ac.thread_local_model;
if (!build_context.no_thread_local) {
e->Variable.thread_local_model = ac.thread_local_model;
}
}
if (ac.is_static && ac.thread_local_model != "") {