From 8932c2d7456fc86b9e92c7976cedcce798caef1a Mon Sep 17 00:00:00 2001 From: Lee Cannon Date: Sun, 20 Dec 2020 21:41:00 +0000 Subject: Added support for no red zone --- lib/std/build.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/std/build.zig b/lib/std/build.zig index 5fd64cad0b..869671c785 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1262,6 +1262,7 @@ pub const LibExeObjStep = struct { disable_stack_probing: bool, disable_sanitize_c: bool, sanitize_thread: bool, + no_red_zone: bool = false, rdynamic: bool, c_std: Builder.CStd, override_lib_dir: ?[]const u8, @@ -2260,6 +2261,9 @@ pub const LibExeObjStep = struct { if (self.disable_stack_probing) { try zig_args.append("-fno-stack-check"); } + if (self.no_red_zone) { + try zig_args.append("-fno-red-zone"); + } if (self.disable_sanitize_c) { try zig_args.append("-fno-sanitize-c"); } -- cgit v1.2.3