mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Merge branch 'master' into sysinfo
This commit is contained in:
@@ -1615,6 +1615,7 @@ void lb_generate_code(lbGenerator *gen) {
|
|||||||
}
|
}
|
||||||
if (is_foreign) {
|
if (is_foreign) {
|
||||||
LLVMSetLinkage(g.value, LLVMExternalLinkage);
|
LLVMSetLinkage(g.value, LLVMExternalLinkage);
|
||||||
|
LLVMSetDLLStorageClass(g.value, LLVMDLLImportStorageClass);
|
||||||
LLVMSetExternallyInitialized(g.value, true);
|
LLVMSetExternallyInitialized(g.value, true);
|
||||||
lb_add_foreign_library_path(m, e->Variable.foreign_library);
|
lb_add_foreign_library_path(m, e->Variable.foreign_library);
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ reflect_args_structure :: proc(ctx: ^Flag_Context, v: any) -> Flag_Error {
|
|||||||
type := types[i];
|
type := types[i];
|
||||||
|
|
||||||
if named_type, ok := type.variant.(Type_Info_Named); ok {
|
if named_type, ok := type.variant.(Type_Info_Named); ok {
|
||||||
if union_type, ok := named_type.base.variant.(Type_Info_Union); ok && union_type.maybe && len(union_type.variants) == 1 {
|
if union_type, ok := named_type.base.variant.(Type_Info_Union); ok && len(union_type.variants) == 1 {
|
||||||
flag.optional = true;
|
flag.optional = true;
|
||||||
flag.tag_ptr = rawptr(uintptr(union_type.tag_offset) + uintptr(v.data) + uintptr(offsets[i]));
|
flag.tag_ptr = rawptr(uintptr(union_type.tag_offset) + uintptr(v.data) + uintptr(offsets[i]));
|
||||||
type = union_type.variants[0];
|
type = union_type.variants[0];
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ walk_files :: proc(info: os.File_Info, in_err: os.Errno) -> (err: os.Errno, skip
|
|||||||
}
|
}
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
init_global_temporary_allocator(mem.megabytes(100));
|
init_global_temporary_allocator(mem.Megabyte * 100)
|
||||||
|
|
||||||
args: Args;
|
args: Args;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user