| author | |
| committer | |
| log | 8aacfc846523aad142537b2bff49162d5feb6a91 |
| tree | 259a87b9f454e5e01c9caba54edbeb9b18a070c2 |
| parent | 02f5a9fa62cc54835467e36b7015a6bcb642583d |
1 files changed, 9 insertions(+), 0 deletions(-)
example/shared_library/mathtest.zig+9| ... | ... | @@ -1,3 +1,12 @@ |
| 1 | // TODO Remove this workaround | |
| 2 | comptime { | |
| 3 | const builtin = @import("builtin"); | |
| 4 | if (builtin.os == builtin.Os.macosx) { | |
| 5 | @export("__mh_execute_header", _mh_execute_header, builtin.GlobalLinkage.Weak); | |
| 6 | } | |
| 7 | } | |
| 8 | var _mh_execute_header = extern struct {x: usize}{.x = 0}; | |
| 9 | ||
| 1 | 10 | export fn add(a: i32, b: i32) i32 { |
| 2 | 11 | return a + b; |
| 3 | 12 | } |