authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-28 15:30:04-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-28 15:30:04-07:00
log84e0c148b1d276d0dd60488c095dfb395372a216
treef8ee603644b56f75d386120a25d5f277941a3281
parentc616141241047d6d6c811d43f644eb1b7d2b26ce

CLI: report error when `-fstage1` requested but not available


1 files changed, 1 insertions(+), 0 deletions(-)

src/Compilation.zig+1
...@@ -1109,6 +1109,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {...@@ -1109,6 +1109,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
1109 const root_name = try arena.dupeZ(u8, options.root_name);1109 const root_name = try arena.dupeZ(u8, options.root_name);
11101110
1111 const use_stage1 = options.use_stage1 orelse false;1111 const use_stage1 = options.use_stage1 orelse false;
1112 if (use_stage1 and !build_options.have_stage1) return error.ZigCompilerBuiltWithoutStage1;
11121113
1113 // Make a decision on whether to use LLVM or our own backend.1114 // Make a decision on whether to use LLVM or our own backend.
1114 const use_llvm = build_options.have_llvm and blk: {1115 const use_llvm = build_options.have_llvm and blk: {