mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-08 06:44:27 +00:00
* 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
3 lines
56 B
Zig
3 lines
56 B
Zig
export fn add(a: i32, b: i32) i32 {
|
|
return a + b;
|
|
}
|