.use_post_mvp_features = 1,
.use_multi_threading = 0,
+ .no_std = 0,
.runtime = Runtime_Onyx,
else if (!strcmp(argv[i], "--generate-foreign-info")) {
options.generate_foreign_info = 1;
}
+ else if (!strcmp(argv[i], "--no-std")) {
+ options.no_std = 1;
+ }
else if (!strcmp(argv[i], "-I")) {
bh_arr_push(options.included_folders, argv[++i]);
}
AstInclude* load_node = create_load(context.ast_alloc, (char *) *filename);
add_entities_for_node(NULL, (AstNode *) load_node, context.global_scope, NULL);
}
+
+ if (!context.options->no_std) {
+ entity_heap_insert(&context.entities, ((Entity) {
+ .state = Entity_State_Parse,
+ .type = Entity_Type_Load_File,
+ .package = NULL,
+ .include = create_load(context.ast_alloc, "core/std"),
+ }));
+ }
}
static void context_free() {