diff --git a/src/Compilation.zig b/src/Compilation.zig index df6fc7b06b192553ca5faed923c4a9b4406814f5..80ca20d7d37475606c0b957a07f2b30b42bda533 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1232,7 +1232,6 @@ pub const cache_helpers = struct { hh.add(mod.sanitize_thread); hh.add(mod.fuzz); hh.add(mod.unwind_tables); - hh.add(mod.structured_cfg); hh.add(mod.no_builtin); hh.addListOfBytes(mod.cc_argv); } @@ -7270,7 +7269,6 @@ fn buildOutputFromZig( .unwind_tables = comp.root_mod.unwind_tables, .pic = comp.root_mod.pic, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, .no_builtin = true, .code_model = comp.root_mod.code_model, .error_tracing = false, @@ -7419,7 +7417,6 @@ pub fn build_crt_file( // Some CRT objects (e.g. musl's rcrt1.o and Scrt1.o) are opinionated about PIC. .pic = options.pic orelse comp.root_mod.pic, .optimize_mode = comp.compilerRtOptMode(), - .structured_cfg = comp.root_mod.structured_cfg, // Some libcs (e.g. musl) are opinionated about -fno-builtin. .no_builtin = options.no_builtin orelse comp.root_mod.no_builtin, .code_model = comp.root_mod.code_model, diff --git a/src/Module.zig b/src/Module.zig index d245c0cf02f15bb7ed695dcac2914285c9debfb6..0567c07a6021f74c13a04c8ff74c6cd509d83633 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -42,8 +42,6 @@ sanitize_thread: bool, fuzz: bool, unwind_tables: std.lang.UnwindTables, cc_argv: []const []const u8, -/// (SPIR-V) whether to generate a structured control flow graph or not -structured_cfg: bool, no_builtin: bool, pub const Deps = std.array_hash_map.String(*Module); @@ -85,7 +83,6 @@ pub const CreateOptions = struct { sanitize_c: ?std.zig.SanitizeC = null, sanitize_thread: ?bool = null, fuzz: ?bool = null, - structured_cfg: ?bool = null, no_builtin: ?bool = null, }; }; @@ -320,17 +317,6 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Module { break :sp target_util.default_stack_protector_buffer_size; }; - const structured_cfg = b: { - if (options.inherited.structured_cfg) |x| break :b x; - if (options.parent) |p| break :b p.structured_cfg; - // We always want a structured control flow in shaders. This option is - // only relevant for OpenCL kernels. - break :b switch (target.os.tag) { - .opencl => false, - else => true, - }; - }; - const no_builtin = b: { if (options.inherited.no_builtin) |x| break :b x; if (options.parent) |p| break :b p.no_builtin; @@ -411,7 +397,6 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Module { .fuzz = fuzz, .unwind_tables = unwind_tables, .cc_argv = options.cc_argv, - .structured_cfg = structured_cfg, .no_builtin = no_builtin, }; return mod; @@ -450,7 +435,6 @@ pub fn createLimited(gpa: Allocator, options: LimitedOptions) Allocator.Error!*M .fuzz = undefined, .unwind_tables = undefined, .cc_argv = undefined, - .structured_cfg = undefined, .no_builtin = undefined, }; return mod; @@ -489,7 +473,6 @@ pub fn createBuiltin(arena: Allocator, opts: Builtin, dirs: std.zig.Directories) .stack_protector = 0, .red_zone = false, .sanitize_c = .off, - .structured_cfg = false, .no_builtin = false, }; return new; diff --git a/src/libs/freebsd.zig b/src/libs/freebsd.zig index fd8e80a78f6931227bd5e1ed7a21366c0cbc775b..0895ef4280ed25592fbcfda9fa54960675d28271 100644 --- a/src/libs/freebsd.zig +++ b/src/libs/freebsd.zig @@ -1077,7 +1077,6 @@ fn buildSharedLib( .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, }, .global = config, .cc_argv = &.{}, diff --git a/src/libs/glibc.zig b/src/libs/glibc.zig index a23757c2f6107cf8b2f48b732d5505563127a9d5..59abb61f333a8baf6ce54a485ff3dcdbdefd2afc 100644 --- a/src/libs/glibc.zig +++ b/src/libs/glibc.zig @@ -1223,7 +1223,6 @@ fn buildSharedLib( .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, }, .global = config, .cc_argv = &.{}, diff --git a/src/libs/libcxx.zig b/src/libs/libcxx.zig index 4036cec8f6447425bd9c7e8eaba5c60e2b33a17c..88a92274188ff5294bf7c868027f49d3c9e5d40c 100644 --- a/src/libs/libcxx.zig +++ b/src/libs/libcxx.zig @@ -172,7 +172,6 @@ pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError! .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, .pic = if (target_util.supports_fpic(target)) true else null, .code_model = comp.root_mod.code_model, }, @@ -366,7 +365,6 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, .unwind_tables = unwind_tables, .pic = if (target_util.supports_fpic(target)) true else null, .code_model = comp.root_mod.code_model, diff --git a/src/libs/libtsan.zig b/src/libs/libtsan.zig index cb15557c5b57c441217568e67caae602ddfa37a9..2621391c769f63c678ab419c0bc8db7c95f2326e 100644 --- a/src/libs/libtsan.zig +++ b/src/libs/libtsan.zig @@ -100,7 +100,6 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo .valgrind = false, .unwind_tables = unwind_tables, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, .pic = true, .no_builtin = true, .code_model = comp.root_mod.code_model, diff --git a/src/libs/musl.zig b/src/libs/musl.zig index 3d32cc98b722252c029489076ea1ef7c9132cc6c..eca461940ce84ad1aa8d26dd406b6c4c3100dbb3 100644 --- a/src/libs/musl.zig +++ b/src/libs/musl.zig @@ -225,7 +225,6 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, }, .global = config, .cc_argv = cc_argv, diff --git a/src/libs/netbsd.zig b/src/libs/netbsd.zig index 3b7162363f148c5332dd721923ef8ff046faa46d..fb811df536ed7fa55f2ec630534e1c995ef978f7 100644 --- a/src/libs/netbsd.zig +++ b/src/libs/netbsd.zig @@ -727,7 +727,6 @@ fn buildSharedLib( .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, }, .global = config, .cc_argv = &.{}, diff --git a/src/libs/openbsd.zig b/src/libs/openbsd.zig index 7f6dc2db817ff630366f463a9405821714a12c95..e38183ab75db6a29eae22695f52550f69b35858c 100644 --- a/src/libs/openbsd.zig +++ b/src/libs/openbsd.zig @@ -647,7 +647,6 @@ fn buildSharedLib( .omit_frame_pointer = comp.root_mod.omit_frame_pointer, .valgrind = false, .optimize_mode = optimize_mode, - .structured_cfg = comp.root_mod.structured_cfg, }, .global = config, .cc_argv = &.{}, diff --git a/src/main.zig b/src/main.zig index a7b8ddb6d08cac1dfd2b882f4dda65ec03c181d1..7a69c9ba65d5c1da8f687f2cb2a6d7ab7eb28698 100644 --- a/src/main.zig +++ b/src/main.zig @@ -557,10 +557,6 @@ const usage_build_generic = \\ -fno-function-sections All functions go into same section \\ -fdata-sections Places each data in a separate section \\ -fno-data-sections All data go into same section - \\ -fformatted-panics Enable formatted safety panics - \\ -fno-formatted-panics Disable formatted safety panics - \\ -fstructured-cfg (SPIR-V) force SPIR-V kernels to use structured control flow - \\ -fno-structured-cfg (SPIR-V) force SPIR-V kernels to not use structured control flow \\ -mexec-model=[value] (WASI) Execution model \\ -municode (Windows) Use wmain/wWinMain as entry point \\ --time-report Send timing diagnostics to '--listen' clients @@ -1200,10 +1196,6 @@ fn buildOutputType( if (mem.eql(u8, next_arg, "--")) break; try extra_rcflags.append(arena, next_arg); } - } else if (mem.eql(u8, arg, "-fstructured-cfg")) { - mod_opts.structured_cfg = true; - } else if (mem.eql(u8, arg, "-fno-structured-cfg")) { - mod_opts.structured_cfg = false; } else if (mem.eql(u8, arg, "--color")) { const next_arg = args_iter.next() orelse { fatal("expected [auto|on|off] after --color", .{}); @@ -1650,12 +1642,6 @@ fn buildOutputType( create_module.opts.debug_format = .{ .dwarf = .@"32" }; } else if (mem.eql(u8, arg, "-gdwarf64")) { create_module.opts.debug_format = .{ .dwarf = .@"64" }; - } else if (mem.eql(u8, arg, "-fformatted-panics")) { - // Remove this after 0.15.0 is tagged. - warn("-fformatted-panics is deprecated and does nothing", .{}); - } else if (mem.eql(u8, arg, "-fno-formatted-panics")) { - // Remove this after 0.15.0 is tagged. - warn("-fno-formatted-panics is deprecated and does nothing", .{}); } else if (mem.eql(u8, arg, "-fsingle-threaded")) { mod_opts.single_threaded = true; } else if (mem.eql(u8, arg, "-fno-single-threaded")) {