Merge pull request #6696 from Spooky309/no-thread-local

Honour -no-thread-local for variables declared at procedure scope
This commit is contained in:
gingerBill
2026-05-18 16:28:39 +01:00
committed by GitHub

View File

@@ -2261,7 +2261,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 != "") {