We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1514dfd commit f9ebe8eCopy full SHA for f9ebe8e
1 file changed
src/main.c
@@ -409,6 +409,29 @@ int main(int argc, char **argv)
409
return 1;
410
}
411
412
+ // Backend detection for @cfg purposes
413
+ if (strstr(g_config.cc, "tcc"))
414
+ {
415
+ if (g_config.cfg_define_count < 64)
416
417
+ g_config.cfg_defines[g_config.cfg_define_count++] = xstrdup("__TINYC__");
418
+ }
419
420
+ else if (strstr(g_config.cc, "clang"))
421
422
423
424
+ g_config.cfg_defines[g_config.cfg_define_count++] = xstrdup("__clang__");
425
426
427
+ else if (strstr(g_config.cc, "zig"))
428
429
430
431
+ g_config.cfg_defines[g_config.cfg_define_count++] = xstrdup("__ZIG__");
432
433
434
+
435
init_builtins();
436
zen_init();
437
0 commit comments