aboutsummaryrefslogtreecommitdiff
path: root/src/tilde.cpp
diff options
context:
space:
mode:
authorFourteenBrush <naessensarthur2@protonmail.com>2024-01-25 10:15:25 +0100
committerFourteenBrush <naessensarthur2@protonmail.com>2024-01-25 10:15:25 +0100
commit967ccfc7ccc0f76c653ff4bb625bac60e89a7904 (patch)
treef989a0f99337c7a0c93ee84249d73ec0c33e306d /src/tilde.cpp
parent712ae1c5ac73493498aa8e5076d91a6558337117 (diff)
parent9cfd4a953e2a7d19237891993b643b2d1477f8b3 (diff)
Merge branch 'master' of https://github.com/FourteenBrush/Odin
Diffstat (limited to 'src/tilde.cpp')
-rw-r--r--src/tilde.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tilde.cpp b/src/tilde.cpp
index b27c42a12..06428f317 100644
--- a/src/tilde.cpp
+++ b/src/tilde.cpp
@@ -215,7 +215,7 @@ gb_internal void cg_set_debug_pos_from_node(cgProcedure *p, Ast *node) {
TokenPos pos = ast_token(node).pos;
TB_SourceFile **file = map_get(&p->module->file_id_map, cast(uintptr)pos.file_id);
if (file) {
- tb_inst_set_location(p->func, *file, pos.line, pos.column);
+ tb_inst_location(p->func, *file, pos.line, pos.column);
}
}
}
@@ -373,7 +373,7 @@ gb_internal bool cg_global_variables_create(cgModule *m, Array<cgGlobalVariable>
TB_Global *global = tb_global_create(m->mod, name.len, cast(char const *)name.text, debug_type, linkage);
cgValue g = cg_value(global, alloc_type_pointer(e->type));
- TB_ModuleSection *section = tb_module_get_data(m->mod);
+ TB_ModuleSectionHandle section = tb_module_get_data(m->mod);
if (e->Variable.thread_local_model != "") {
section = tb_module_get_tls(m->mod);
@@ -726,6 +726,10 @@ gb_internal bool cg_generate_code(Checker *c, LinkerData *linker_data) {
linker_data_init(linker_data, info, c->parser->init_fullpath);
+ #if defined(GB_SYSTEM_OSX)
+ linker_enable_system_library_linking(linker_data);
+ #endif
+
cg_global_arena_init();
cgModule *m = cg_module_create(c);