mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-23 14:14:59 -07:00
Add @(link_section=<string>) for global variables
This commit is contained in:
@@ -14880,6 +14880,9 @@ void lb_generate_code(lbGenerator *gen) {
|
||||
LLVMSetLinkage(g.value, LLVMInternalLinkage);
|
||||
}
|
||||
}
|
||||
if (e->Variable.link_section.len > 0) {
|
||||
LLVMSetSection(g.value, alloc_cstring(permanent_allocator(), e->Variable.link_section));
|
||||
}
|
||||
|
||||
lbGlobalVariable var = {};
|
||||
var.var = g;
|
||||
|
||||
Reference in New Issue
Block a user