diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-08-25 04:50:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-25 04:50:51 -0400 |
| commit | 4003cd4747019d79ff50aaa22415d2d3dfc15cf4 (patch) | |
| tree | 1f77690a5fb7ccbef75bcab9c8c1e008ef3c5068 /example/shared_library | |
| parent | bf1f91595d4d3b5911632c671ef16e44d70dc9a6 (diff) | |
| parent | 815950996dcc92ac6ac285f2005dbac51b9cb6f8 (diff) | |
| download | zig-4003cd4747019d79ff50aaa22415d2d3dfc15cf4.tar.gz zig-4003cd4747019d79ff50aaa22415d2d3dfc15cf4.zip | |
Merge pull request #1406 from ziglang/macos-stack-traces
MacOS stack traces
closes #1365
Diffstat (limited to 'example/shared_library')
| -rw-r--r-- | example/shared_library/mathtest.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/example/shared_library/mathtest.zig b/example/shared_library/mathtest.zig index a04ec1544d..96e41f847c 100644 --- a/example/shared_library/mathtest.zig +++ b/example/shared_library/mathtest.zig @@ -1,3 +1,12 @@ +// 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; } |
