diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-17 16:00:24 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-05-17 16:00:24 -0700 |
| commit | f52189834c8554f6358244471c789e2233c260f0 (patch) | |
| tree | 957791cea71422e1e408a63d82e485eb9da2f0f0 /src | |
| parent | fea615710268582f488b894e4276938c5e385636 (diff) | |
| download | zig-f52189834c8554f6358244471c789e2233c260f0.tar.gz zig-f52189834c8554f6358244471c789e2233c260f0.zip | |
rename omit_pkg_fetching_code to only_core_functionality
No functional changes. This renames an internal build option to better
reflect how it is used.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compilation.zig | 2 | ||||
| -rw-r--r-- | src/main.zig | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 0a01e9465c..b485800329 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2056,7 +2056,7 @@ pub fn update(comp: *Compilation, main_progress_node: *std.Progress.Node) !void return; } - if (!build_options.only_c and !build_options.omit_pkg_fetching_code) { + if (!build_options.only_c and !build_options.only_core_functionality) { if (comp.emit_docs) |doc_location| { if (comp.bin_file.options.module) |module| { var autodoc = Autodoc.init(module, doc_location); diff --git a/src/main.zig b/src/main.zig index 2771b64622..650741e5e4 100644 --- a/src/main.zig +++ b/src/main.zig @@ -292,7 +292,7 @@ pub fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi mem.eql(u8, cmd, "wasm-ld")) { return process.exit(try lldMain(arena, args, true)); - } else if (build_options.omit_pkg_fetching_code) { + } else if (build_options.only_core_functionality) { @panic("only a few subcommands are supported in a zig2.c build"); } else if (mem.eql(u8, cmd, "cc")) { return buildOutputType(gpa, arena, args, .cc); @@ -680,7 +680,7 @@ const ArgMode = union(enum) { /// Avoid dragging networking into zig2.c because it adds dependencies on some /// linker symbols that are annoying to satisfy while bootstrapping. -const Ip4Address = if (build_options.omit_pkg_fetching_code) void else std.net.Ip4Address; +const Ip4Address = if (build_options.only_core_functionality) void else std.net.Ip4Address; const Listen = union(enum) { none, @@ -1179,7 +1179,7 @@ fn buildOutputType( if (mem.eql(u8, next_arg, "-")) { listen = .stdio; } else { - if (build_options.omit_pkg_fetching_code) unreachable; + if (build_options.only_core_functionality) unreachable; // example: --listen 127.0.0.1:9000 var it = std.mem.split(u8, next_arg, ":"); const host = it.next().?; @@ -3268,7 +3268,7 @@ fn buildOutputType( return cleanExit(); }, .ip4 => |ip4_addr| { - if (build_options.omit_pkg_fetching_code) unreachable; + if (build_options.only_core_functionality) unreachable; var server = std.net.StreamServer.init(.{ .reuse_address = true, @@ -4415,7 +4415,7 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi .root_src_directory = build_directory, .root_src_path = build_zig_basename, }; - if (!build_options.omit_pkg_fetching_code) { + if (!build_options.only_core_functionality) { var http_client: std.http.Client = .{ .allocator = gpa }; defer http_client.deinit(); |
