diff options
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/build.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index 6c91303c14..600fb691ae 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1516,6 +1516,9 @@ pub const LibExeObjStep = struct { /// Experimental. Uses system Darling installation to run cross compiled macOS build artifacts. enable_darling: bool = false, + /// Darwin. Uses Rosetta to run x86_64 macOS build artifacts on arm64 macOS. + enable_rosetta: bool = false, + /// After following the steps in https://github.com/ziglang/zig/wiki/Updating-libc#glibc, /// this will be the directory $glibc-build-dir/install/glibcs /// Given the example of the aarch64 target, this is the directory @@ -2529,7 +2532,10 @@ pub const LibExeObjStep = struct { } } } else switch (self.target.getExternalExecutor()) { - .native, .rosetta, .unavailable => {}, + .native, .unavailable => {}, + .rosetta => if (self.enable_rosetta) { + try zig_args.append("--test-cmd-bin"); + }, .qemu => |bin_name| if (self.enable_qemu) qemu: { const need_cross_glibc = self.target.isGnuLibC() and self.is_linking_libc; const glibc_dir_arg = if (need_cross_glibc) |
