| ... | ... | @@ -53,6 +53,7 @@ pub fn build(b: *Builder) !void { |
| 53 | 53 | const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false; |
| 54 | 54 | const skip_run_translated_c = b.option(bool, "skip-run-translated-c", "Main test suite skips run-translated-c tests") orelse false; |
| 55 | 55 | const skip_stage2_tests = b.option(bool, "skip-stage2-tests", "Main test suite skips self-hosted compiler tests") orelse false; |
| 56 | const skip_install_lib_files = b.option(bool, "skip-install-lib-files", "Do not copy lib/ files to installation prefix") orelse false; |
| 56 | 57 | |
| 57 | 58 | const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false; |
| 58 | 59 | const is_stage1 = b.option(bool, "stage1", "Build the stage1 compiler, put stage2 behind a feature flag") orelse false; |
| ... | ... | @@ -61,19 +62,21 @@ pub fn build(b: *Builder) !void { |
| 61 | 62 | const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse (is_stage1 or static_llvm); |
| 62 | 63 | const config_h_path_option = b.option([]const u8, "config_h", "Path to the generated config.h"); |
| 63 | 64 | |
| 64 | | b.installDirectory(InstallDirectoryOptions{ |
| 65 | | .source_dir = "lib", |
| 66 | | .install_dir = .Lib, |
| 67 | | .install_subdir = "zig", |
| 68 | | .exclude_extensions = &[_][]const u8{ |
| 69 | | "test.zig", |
| 70 | | "README.md", |
| 71 | | ".z.0", |
| 72 | | ".z.9", |
| 73 | | ".gz", |
| 74 | | "rfc1951.txt", |
| 75 | | }, |
| 76 | | }); |
| 65 | if (!skip_install_lib_files) { |
| 66 | b.installDirectory(InstallDirectoryOptions{ |
| 67 | .source_dir = "lib", |
| 68 | .install_dir = .Lib, |
| 69 | .install_subdir = "zig", |
| 70 | .exclude_extensions = &[_][]const u8{ |
| 71 | "test.zig", |
| 72 | "README.md", |
| 73 | ".z.0", |
| 74 | ".z.9", |
| 75 | ".gz", |
| 76 | "rfc1951.txt", |
| 77 | }, |
| 78 | }); |
| 79 | } |
| 77 | 80 | |
| 78 | 81 | if (only_install_lib_files) |
| 79 | 82 | return; |