diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-12-01 17:32:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-01 17:32:27 -0800 |
| commit | 14b532ec8596d7f84b76127f1b858271f010126f (patch) | |
| tree | 1e05b622760b5288bba853c575daa2d048a10403 /src | |
| parent | 1912ec0323af9a9077a8706157beb8207f6e3eb9 (diff) | |
| parent | 42db5156656ebd1649f7ec3707697b08657b9cab (diff) | |
| download | zig-14b532ec8596d7f84b76127f1b858271f010126f.tar.gz zig-14b532ec8596d7f84b76127f1b858271f010126f.zip | |
Merge pull request #10122 from ziglang/x86_64-as-native-rosetta
Treat x86_64 tests as native under the Rosetta 2 on M1 Macs
Diffstat (limited to 'src')
| -rw-r--r-- | src/test.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test.zig b/src/test.zig index 44faea0ed9..69d2d31a08 100644 --- a/src/test.zig +++ b/src/test.zig @@ -10,6 +10,7 @@ const enable_qemu: bool = build_options.enable_qemu; const enable_wine: bool = build_options.enable_wine; const enable_wasmtime: bool = build_options.enable_wasmtime; const enable_darling: bool = build_options.enable_darling; +const enable_rosetta: bool = build_options.enable_rosetta; const glibc_multi_install_dir: ?[]const u8 = build_options.glibc_multi_install_dir; const skip_compile_errors = build_options.skip_compile_errors; const ThreadPool = @import("ThreadPool.zig"); @@ -1132,6 +1133,12 @@ pub const TestContext = struct { .native => try argv.append(exe_path), .unavailable => return, // Pass test. + .rosetta => if (enable_rosetta) { + try argv.append(exe_path); + } else { + return; // Rosetta not available, pass test. + }, + .qemu => |qemu_bin_name| if (enable_qemu) { // TODO Ability for test cases to specify whether to link libc. const need_cross_glibc = false; // target.isGnuLibC() and self.is_linking_libc; |
