aboutsummaryrefslogtreecommitdiff
path: root/example/shared_library/mathtest.zig
blob: a2ae77b520ee798eea419f591c7f3b0f2790ddd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// TODO Remove this workaround
comptime {
    const builtin = @import("builtin");
    if (builtin.os == builtin.Os.macosx) {
        @export("__mh_execute_header", _mh_execute_header, builtin.GlobalLinkage.Weak);
    }
}
var _mh_execute_header = extern struct.{
    x: usize,
}.{ .x = 0 };

export fn add(a: i32, b: i32) i32 {
    return a + b;
}