| author | |
| committer | |
| log | 876ab99f5c462e93296ef0b2f642ac2243acb31c |
| tree | aeff0e4e284e35f4fea3222c852a015a1ced783f |
| parent | e0401498e928a539677f0f9eed843a0453bc8c33 |
This makes building from source go faster and avoids tripping over
unimplemented things in the C backend.3 files changed, 15 insertions(+), 11 deletions(-)
build.zig+1| ... | ... | @@ -185,6 +185,7 @@ pub fn build(b: *Builder) !void { |
| 185 | 185 | exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc); |
| 186 | 186 | exe_options.addOption(bool, "force_gpa", force_gpa); |
| 187 | 187 | exe_options.addOption(bool, "only_c", only_c); |
| 188 | exe_options.addOption(bool, "omit_pkg_fetching_code", false); | |
| 188 | 189 | |
| 189 | 190 | if (link_libc) { |
| 190 | 191 | exe.linkLibC(); |
src/main.zig+13-11| ... | ... | @@ -4083,17 +4083,19 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4083 | 4083 | try thread_pool.init(gpa); |
| 4084 | 4084 | defer thread_pool.deinit(); |
| 4085 | 4085 | |
| 4086 | var http_client: std.http.Client = .{ .allocator = gpa }; | |
| 4087 | defer http_client.deinit(); | |
| 4088 | try http_client.rescanRootCertificates(); | |
| 4089 | ||
| 4090 | try main_pkg.fetchAndAddDependencies( | |
| 4091 | &thread_pool, | |
| 4092 | &http_client, | |
| 4093 | build_directory, | |
| 4094 | global_cache_directory, | |
| 4095 | local_cache_directory, | |
| 4096 | ); | |
| 4086 | if (!build_options.omit_pkg_fetching_code) { | |
| 4087 | var http_client: std.http.Client = .{ .allocator = gpa }; | |
| 4088 | defer http_client.deinit(); | |
| 4089 | try http_client.rescanRootCertificates(); | |
| 4090 | ||
| 4091 | try main_pkg.fetchAndAddDependencies( | |
| 4092 | &thread_pool, | |
| 4093 | &http_client, | |
| 4094 | build_directory, | |
| 4095 | global_cache_directory, | |
| 4096 | local_cache_directory, | |
| 4097 | ); | |
| 4098 | } | |
| 4097 | 4099 | |
| 4098 | 4100 | const comp = Compilation.create(gpa, .{ |
| 4099 | 4101 | .zig_lib_directory = zig_lib_directory, |
stage1/config.zig.in+1| ... | ... | @@ -12,3 +12,4 @@ pub const have_stage1 = false; |
| 12 | 12 | pub const skip_non_native = false; |
| 13 | 13 | pub const only_c = false; |
| 14 | 14 | pub const force_gpa = false; |
| 15 | pub const omit_pkg_fetching_code = true; |