diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-10-28 15:30:04 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-10-28 15:30:04 -0700 |
| commit | 84e0c148b1d276d0dd60488c095dfb395372a216 (patch) | |
| tree | f8ee603644b56f75d386120a25d5f277941a3281 /src/Compilation.zig | |
| parent | c616141241047d6d6c811d43f644eb1b7d2b26ce (diff) | |
| download | zig-84e0c148b1d276d0dd60488c095dfb395372a216.tar.gz zig-84e0c148b1d276d0dd60488c095dfb395372a216.zip | |
CLI: report error when `-fstage1` requested but not available
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 5c3db25555..be9e82cd87 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1109,6 +1109,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const root_name = try arena.dupeZ(u8, options.root_name); const use_stage1 = options.use_stage1 orelse false; + if (use_stage1 and !build_options.have_stage1) return error.ZigCompilerBuiltWithoutStage1; // Make a decision on whether to use LLVM or our own backend. const use_llvm = build_options.have_llvm and blk: { |
