| ... | @@ -55,6 +55,7 @@ pub fn build(b: *Builder) !void { | ... | @@ -55,6 +55,7 @@ pub fn build(b: *Builder) !void { |
| 55 | | 55 | |
| 56 | const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false; | 56 | const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false; |
| 57 | const is_stage1 = b.option(bool, "stage1", "Build the stage1 compiler, put stage2 behind a feature flag") orelse false; | 57 | const is_stage1 = b.option(bool, "stage1", "Build the stage1 compiler, put stage2 behind a feature flag") orelse false; |
| | 58 | const omit_stage2 = b.option(bool, "omit-stage2", "Do not include stage2 behind a feature flag inside stage1") orelse false; |
| 58 | const static_llvm = b.option(bool, "static-llvm", "Disable integration with system-installed LLVM, Clang, LLD, and libc++") orelse false; | 59 | const static_llvm = b.option(bool, "static-llvm", "Disable integration with system-installed LLVM, Clang, LLD, and libc++") orelse false; |
| 59 | const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse (is_stage1 or static_llvm); | 60 | const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse (is_stage1 or static_llvm); |
| 60 | const config_h_path_option = b.option([]const u8, "config_h", "Path to the generated config.h"); | 61 | const config_h_path_option = b.option([]const u8, "config_h", "Path to the generated config.h"); |
| ... | @@ -196,7 +197,7 @@ pub fn build(b: *Builder) !void { | ... | @@ -196,7 +197,7 @@ pub fn build(b: *Builder) !void { |
| 196 | exe.addBuildOption(bool, "enable_logging", enable_logging); | 197 | exe.addBuildOption(bool, "enable_logging", enable_logging); |
| 197 | exe.addBuildOption(bool, "enable_tracy", tracy != null); | 198 | exe.addBuildOption(bool, "enable_tracy", tracy != null); |
| 198 | exe.addBuildOption(bool, "is_stage1", is_stage1); | 199 | exe.addBuildOption(bool, "is_stage1", is_stage1); |
| 199 | exe.addBuildOption(bool, "omit_stage2", false); | 200 | exe.addBuildOption(bool, "omit_stage2", omit_stage2); |
| 200 | if (tracy) |tracy_path| { | 201 | if (tracy) |tracy_path| { |
| 201 | const client_cpp = fs.path.join( | 202 | const client_cpp = fs.path.join( |
| 202 | b.allocator, | 203 | b.allocator, |
| ... | @@ -219,7 +220,7 @@ pub fn build(b: *Builder) !void { | ... | @@ -219,7 +220,7 @@ pub fn build(b: *Builder) !void { |
| 219 | | 220 | |
| 220 | test_stage2.addBuildOption(bool, "skip_non_native", skip_non_native); | 221 | test_stage2.addBuildOption(bool, "skip_non_native", skip_non_native); |
| 221 | test_stage2.addBuildOption(bool, "is_stage1", is_stage1); | 222 | test_stage2.addBuildOption(bool, "is_stage1", is_stage1); |
| 222 | test_stage2.addBuildOption(bool, "omit_stage2", false); | 223 | test_stage2.addBuildOption(bool, "omit_stage2", omit_stage2); |
| 223 | test_stage2.addBuildOption(bool, "have_llvm", enable_llvm); | 224 | test_stage2.addBuildOption(bool, "have_llvm", enable_llvm); |
| 224 | test_stage2.addBuildOption(bool, "enable_qemu", is_qemu_enabled); | 225 | test_stage2.addBuildOption(bool, "enable_qemu", is_qemu_enabled); |
| 225 | test_stage2.addBuildOption(bool, "enable_wine", is_wine_enabled); | 226 | test_stage2.addBuildOption(bool, "enable_wine", is_wine_enabled); |