Error if -no-thread-local is used in presence of -no-crt on Unix

This commit is contained in:
flysand7
2025-01-17 02:15:30 +03:00
parent 4f0206ce08
commit 3f20b63243
2 changed files with 10 additions and 18 deletions

View File

@@ -1822,19 +1822,6 @@ gb_internal Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *nam
break;
case Entity_Variable:
if (e->kind == Entity_Variable && build_context.no_crt && !build_context.no_thread_local && e->Variable.thread_local_model != "") {
switch (build_context.metrics.os) {
case TargetOs_linux:
case TargetOs_darwin:
case TargetOs_essence:
case TargetOs_freebsd:
case TargetOs_openbsd:
case TargetOs_netbsd:
case TargetOs_haiku:
Token token = ast_token(n);
error(token, "Illegal usage of thread locals: '%.*s'", LIT(e->token.string));
}
}
e->flags |= EntityFlag_Used;
if (type == t_invalid) {
o->type = t_invalid;