cbe: fixup __asm style exports, re-enable 12680 on macos now that alias isn't used

This commit is contained in:
kcbanner
2023-11-05 23:36:11 -05:00
parent 8c0e0cd353
commit 50e2fb8fd0
2 changed files with 4 additions and 7 deletions

View File

@@ -194,9 +194,11 @@ typedef char bool;
#endif /*_M_X64 */
#else /* _MSC_VER */
#if __APPLE__
#define zig_export(sig, symbol, name) __asm("_" name " = _" #symbol)
#define zig_export(sig, symbol, name) zig_extern sig;\
__asm("_" name " = _" #symbol)
#else /* __APPLE__ */
#define zig_export(sig, symbol, name) __asm(name " = " #symbol)
#define zig_export(sig, symbol, name) zig_extern sig;\
__asm(name " = " #symbol)
#endif /* __APPLE__ */
#endif /* _MSC_VER */

View File

@@ -12,11 +12,6 @@ test "export a function twice" {
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest;
if (builtin.os.tag == .macos and builtin.zig_backend == .stage2_c) {
// TODO: test.c: error: aliases are not supported on darwin
return error.SkipZigTest;
}
// If it exports the function correctly, `test_func` and `testFunc` will points to the same address.
try expectEqual(test_func(), other_file.testFunc());
}