28bf768883
* also fix extern variables with initialiaztion values to generate runtime code * remove the workaround in example/shared_library/mathtest.zig * introduce the ability for global variables to have Weak and LinkOnce linkage * fix `@export` to work for non-functions. this code needs to be audited though. * fix comptime ptrcast not keeping bigger alignment * fix linker warnings when targeting darwin closes #1903
4 lines
56 B
Zig
4 lines
56 B
Zig
export fn add(a: i32, b: i32) i32 {
|
|
return a + b;
|
|
}
|