aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 2913a07bb4..e423b6fd0e 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -4020,6 +4020,8 @@ static TypeTableEntry *analyze_builtin_fn_call_expr(CodeGen *g, ImportTableEntry
if (buf_eql_str(&var_name, "is_big_endian")) {
return resolve_expr_const_val_as_bool(g, node, g->is_big_endian);
+ } else if (buf_eql_str(&var_name, "is_release")) {
+ return resolve_expr_const_val_as_bool(g, node, g->build_type == CodeGenBuildTypeRelease);
} else {
add_node_error(g, *str_node,
buf_sprintf("unrecognized compile variable: '%s'", buf_ptr(&var_name)));