mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-06 10:44:06 +00:00
Add @(link_section=<string>) for global variables
This commit is contained in:
@@ -934,6 +934,9 @@ void check_global_variable_decl(CheckerContext *ctx, Entity *&e, Ast *type_expr,
|
||||
if (ac.link_name.len > 0) {
|
||||
e->Variable.link_name = ac.link_name;
|
||||
}
|
||||
if (ac.link_section.len > 0) {
|
||||
e->Variable.link_section = ac.link_section;
|
||||
}
|
||||
|
||||
if (e->Variable.is_foreign || e->Variable.is_export) {
|
||||
String name = e->token.string;
|
||||
|
||||
Reference in New Issue
Block a user