mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
disable package manager code when bootstrapping
This makes building from source go faster and avoids tripping over unimplemented things in the C backend.
This commit is contained in:
parent
e0401498e9
commit
876ab99f5c
@ -185,6 +185,7 @@ pub fn build(b: *Builder) !void {
|
||||
exe_options.addOption(bool, "llvm_has_arc", llvm_has_arc);
|
||||
exe_options.addOption(bool, "force_gpa", force_gpa);
|
||||
exe_options.addOption(bool, "only_c", only_c);
|
||||
exe_options.addOption(bool, "omit_pkg_fetching_code", false);
|
||||
|
||||
if (link_libc) {
|
||||
exe.linkLibC();
|
||||
|
||||
22
src/main.zig
22
src/main.zig
@ -4083,17 +4083,19 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi
|
||||
try thread_pool.init(gpa);
|
||||
defer thread_pool.deinit();
|
||||
|
||||
var http_client: std.http.Client = .{ .allocator = gpa };
|
||||
defer http_client.deinit();
|
||||
try http_client.rescanRootCertificates();
|
||||
if (!build_options.omit_pkg_fetching_code) {
|
||||
var http_client: std.http.Client = .{ .allocator = gpa };
|
||||
defer http_client.deinit();
|
||||
try http_client.rescanRootCertificates();
|
||||
|
||||
try main_pkg.fetchAndAddDependencies(
|
||||
&thread_pool,
|
||||
&http_client,
|
||||
build_directory,
|
||||
global_cache_directory,
|
||||
local_cache_directory,
|
||||
);
|
||||
try main_pkg.fetchAndAddDependencies(
|
||||
&thread_pool,
|
||||
&http_client,
|
||||
build_directory,
|
||||
global_cache_directory,
|
||||
local_cache_directory,
|
||||
);
|
||||
}
|
||||
|
||||
const comp = Compilation.create(gpa, .{
|
||||
.zig_lib_directory = zig_lib_directory,
|
||||
|
||||
@ -12,3 +12,4 @@ pub const have_stage1 = false;
|
||||
pub const skip_non_native = false;
|
||||
pub const only_c = false;
|
||||
pub const force_gpa = false;
|
||||
pub const omit_pkg_fetching_code = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user