aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-02-28 15:40:00 +0000
committergingerBill <bill@gingerbill.org>2022-02-28 15:40:00 +0000
commit410b85b5c7f768543e03c9fc6f47f8c2efcd602b (patch)
treeff75f12afbb05c5e4b651d9dc1b4a17cd81575bb /src/check_decl.cpp
parent0ae012ba08c1981952dc508ab2b6244331926ba1 (diff)
Disallow `@(thread_local)` on wasm targets
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index b3b1e4474..12b0e43cb 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -1130,6 +1130,10 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr,
}
ac.link_name = handle_link_name(ctx, e->token, ac.link_name, ac.link_prefix);
+ if (is_arch_wasm() && e->Variable.thread_local_model.len != 0) {
+ error(e->token, "@(thread_local) is not supported for this target platform");
+ }
+
String context_name = str_lit("variable declaration");
if (type_expr != nullptr) {