| ... | @@ -668,9 +668,13 @@ const ArgMode = union(enum) { | ... | @@ -668,9 +668,13 @@ const ArgMode = union(enum) { |
| 668 | run, | 668 | run, |
| 669 | }; | 669 | }; |
| 670 | | 670 | |
| | 671 | /// Avoid dragging networking into zig2.c because it adds dependencies on some |
| | 672 | /// linker symbols that are annoying to satisfy while bootstrapping. |
| | 673 | const Ip4Address = if (build_options.omit_pkg_fetching_code) void else std.net.Ip4Address; |
| | 674 | |
| 671 | const Listen = union(enum) { | 675 | const Listen = union(enum) { |
| 672 | none, | 676 | none, |
| 673 | ip4: std.net.Ip4Address, | 677 | ip4: Ip4Address, |
| 674 | stdio, | 678 | stdio, |
| 675 | }; | 679 | }; |
| 676 | | 680 | |
| ... | @@ -1159,6 +1163,7 @@ fn buildOutputType( | ... | @@ -1159,6 +1163,7 @@ fn buildOutputType( |
| 1159 | listen = .stdio; | 1163 | listen = .stdio; |
| 1160 | watch = true; | 1164 | watch = true; |
| 1161 | } else { | 1165 | } else { |
| | 1166 | if (build_options.omit_pkg_fetching_code) unreachable; |
| 1162 | // example: --listen 127.0.0.1:9000 | 1167 | // example: --listen 127.0.0.1:9000 |
| 1163 | var it = std.mem.split(u8, next_arg, ":"); | 1168 | var it = std.mem.split(u8, next_arg, ":"); |
| 1164 | const host = it.next().?; | 1169 | const host = it.next().?; |
| ... | @@ -3303,6 +3308,8 @@ fn buildOutputType( | ... | @@ -3303,6 +3308,8 @@ fn buildOutputType( |
| 3303 | return cleanExit(); | 3308 | return cleanExit(); |
| 3304 | }, | 3309 | }, |
| 3305 | .ip4 => |ip4_addr| { | 3310 | .ip4 => |ip4_addr| { |
| | 3311 | if (build_options.omit_pkg_fetching_code) unreachable; |
| | 3312 | |
| 3306 | var server = std.net.StreamServer.init(.{ | 3313 | var server = std.net.StreamServer.init(.{ |
| 3307 | .reuse_address = true, | 3314 | .reuse_address = true, |
| 3308 | }); | 3315 | }); |