Skip to content

Commit 45a378b

Browse files
committed
std: restructure child process namespace
1 parent fb88cfd commit 45a378b

File tree

24 files changed

+2048
-2048
lines changed

24 files changed

+2048
-2048
lines changed

CMakeLists.txt

Lines changed: 104 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -193,100 +193,6 @@ set(ZIG_CPP_SOURCES
193193
# Needed because we use cmake, not the zig build system, to build zig2.o.
194194
set(ZIG_STAGE2_SOURCES
195195
"${ZIG_CONFIG_ZIG_OUT}"
196-
lib/std/array_hash_map.zig
197-
lib/std/array_list.zig
198-
lib/std/ascii.zig
199-
lib/std/atomic.zig
200-
lib/std/base64.zig
201-
lib/std/BitStack.zig
202-
lib/std/buf_map.zig
203-
lib/std/Build.zig
204-
lib/std/Build/Cache.zig
205-
lib/std/Build/Cache/DepTokenizer.zig
206-
lib/std/builtin.zig
207-
lib/std/c.zig
208-
lib/std/c/linux.zig
209-
lib/std/child_process.zig
210-
lib/std/coff.zig
211-
lib/std/static_string_map.zig
212-
lib/std/crypto.zig
213-
lib/std/crypto/blake3.zig
214-
lib/std/crypto/siphash.zig
215-
lib/std/debug.zig
216-
lib/std/dwarf.zig
217-
lib/std/dwarf/AT.zig
218-
lib/std/dwarf/ATE.zig
219-
lib/std/dwarf/FORM.zig
220-
lib/std/dwarf/LANG.zig
221-
lib/std/dwarf/OP.zig
222-
lib/std/dwarf/TAG.zig
223-
lib/std/elf.zig
224-
lib/std/fifo.zig
225-
lib/std/fmt.zig
226-
lib/std/fmt/format_float.zig
227-
lib/std/fmt/parse_float.zig
228-
lib/std/fs.zig
229-
lib/std/fs/AtomicFile.zig
230-
lib/std/fs/Dir.zig
231-
lib/std/fs/File.zig
232-
lib/std/fs/get_app_data_dir.zig
233-
lib/std/fs/path.zig
234-
lib/std/hash.zig
235-
lib/std/hash/auto_hash.zig
236-
lib/std/hash/wyhash.zig
237-
lib/std/hash_map.zig
238-
lib/std/heap.zig
239-
lib/std/heap/arena_allocator.zig
240-
lib/std/io.zig
241-
lib/std/io/buffered_atomic_file.zig
242-
lib/std/io/buffered_writer.zig
243-
lib/std/io/change_detection_stream.zig
244-
lib/std/io/counting_reader.zig
245-
lib/std/io/counting_writer.zig
246-
lib/std/io/find_byte_writer.zig
247-
lib/std/io/fixed_buffer_stream.zig
248-
lib/std/io/limited_reader.zig
249-
lib/std/io/Reader.zig
250-
lib/std/io/seekable_stream.zig
251-
lib/std/io/Writer.zig
252-
lib/std/json.zig
253-
lib/std/json/stringify.zig
254-
lib/std/leb128.zig
255-
lib/std/linked_list.zig
256-
lib/std/log.zig
257-
lib/std/macho.zig
258-
lib/std/math.zig
259-
lib/std/math/big.zig
260-
lib/std/math/big/int.zig
261-
lib/std/math/float.zig
262-
lib/std/math/frexp.zig
263-
lib/std/math/isinf.zig
264-
lib/std/math/isnan.zig
265-
lib/std/math/log.zig
266-
lib/std/math/log10.zig
267-
lib/std/math/log2.zig
268-
lib/std/math/signbit.zig
269-
lib/std/math/sqrt.zig
270-
lib/std/mem.zig
271-
lib/std/mem/Allocator.zig
272-
lib/std/meta.zig
273-
lib/std/meta/trailer_flags.zig
274-
lib/std/multi_array_list.zig
275-
lib/std/os.zig
276-
lib/std/os/linux.zig
277-
lib/std/os/linux/x86_64.zig
278-
lib/std/os/linux.zig
279-
lib/std/os/linux/IoUring.zig
280-
lib/std/os/linux/io_uring_sqe.zig
281-
lib/std/os/linux/x86_64.zig
282-
lib/std/os/windows.zig
283-
lib/std/os/windows/ntstatus.zig
284-
lib/std/os/windows/win32error.zig
285-
lib/std/Progress.zig
286-
lib/std/pdb.zig
287-
lib/std/process.zig
288-
lib/std/Random.zig
289-
lib/std/sort.zig
290196
lib/compiler_rt.zig
291197
lib/compiler_rt/absv.zig
292198
lib/compiler_rt/absvdi2.zig
@@ -363,7 +269,7 @@ set(ZIG_STAGE2_SOURCES
363269
lib/compiler_rt/fixxfdi.zig
364270
lib/compiler_rt/fixxfsi.zig
365271
lib/compiler_rt/fixxfti.zig
366-
lib/compiler_rt/int_from_float.zig
272+
lib/compiler_rt/float_from_int.zig
367273
lib/compiler_rt/floatdidf.zig
368274
lib/compiler_rt/floatdihf.zig
369275
lib/compiler_rt/floatdisf.zig
@@ -404,7 +310,7 @@ set(ZIG_STAGE2_SOURCES
404310
lib/compiler_rt/getf2.zig
405311
lib/compiler_rt/gexf2.zig
406312
lib/compiler_rt/int.zig
407-
lib/compiler_rt/float_from_int.zig
313+
lib/compiler_rt/int_from_float.zig
408314
lib/compiler_rt/log.zig
409315
lib/compiler_rt/log10.zig
410316
lib/compiler_rt/log2.zig
@@ -417,7 +323,11 @@ set(ZIG_STAGE2_SOURCES
417323
lib/compiler_rt/multf3.zig
418324
lib/compiler_rt/mulxf3.zig
419325
lib/compiler_rt/negXi2.zig
326+
lib/compiler_rt/negdf2.zig
327+
lib/compiler_rt/negsf2.zig
328+
lib/compiler_rt/negtf2.zig
420329
lib/compiler_rt/negv.zig
330+
lib/compiler_rt/negxf2.zig
421331
lib/compiler_rt/os_version_check.zig
422332
lib/compiler_rt/parity.zig
423333
lib/compiler_rt/popcount.zig
@@ -430,15 +340,11 @@ set(ZIG_STAGE2_SOURCES
430340
lib/compiler_rt/sincos.zig
431341
lib/compiler_rt/sqrt.zig
432342
lib/compiler_rt/stack_probe.zig
343+
lib/compiler_rt/subdf3.zig
433344
lib/compiler_rt/subo.zig
434345
lib/compiler_rt/subsf3.zig
435-
lib/compiler_rt/subdf3.zig
436346
lib/compiler_rt/subtf3.zig
437347
lib/compiler_rt/subxf3.zig
438-
lib/compiler_rt/negsf2.zig
439-
lib/compiler_rt/negdf2.zig
440-
lib/compiler_rt/negtf2.zig
441-
lib/compiler_rt/negxf2.zig
442348
lib/compiler_rt/tan.zig
443349
lib/compiler_rt/trig.zig
444350
lib/compiler_rt/trunc.zig
@@ -461,8 +367,12 @@ set(ZIG_STAGE2_SOURCES
461367
lib/compiler_rt/unorddf2.zig
462368
lib/compiler_rt/unordsf2.zig
463369
lib/compiler_rt/unordtf2.zig
464-
lib/std/start.zig
465-
lib/std/std.zig
370+
lib/std/BitStack.zig
371+
lib/std/Build.zig
372+
lib/std/Build/Cache.zig
373+
lib/std/Build/Cache/DepTokenizer.zig
374+
lib/std/Progress.zig
375+
lib/std/Random.zig
466376
lib/std/Target.zig
467377
lib/std/Target/Query.zig
468378
lib/std/Target/aarch64.zig
@@ -476,8 +386,8 @@ set(ZIG_STAGE2_SOURCES
476386
lib/std/Target/nvptx.zig
477387
lib/std/Target/powerpc.zig
478388
lib/std/Target/riscv.zig
479-
lib/std/Target/sparc.zig
480389
lib/std/Target/s390x.zig
390+
lib/std/Target/sparc.zig
481391
lib/std/Target/wasm.zig
482392
lib/std/Target/x86.zig
483393
lib/std/Thread.zig
@@ -486,6 +396,96 @@ set(ZIG_STAGE2_SOURCES
486396
lib/std/Thread/Pool.zig
487397
lib/std/Thread/ResetEvent.zig
488398
lib/std/Thread/WaitGroup.zig
399+
lib/std/array_hash_map.zig
400+
lib/std/array_list.zig
401+
lib/std/ascii.zig
402+
lib/std/atomic.zig
403+
lib/std/base64.zig
404+
lib/std/buf_map.zig
405+
lib/std/builtin.zig
406+
lib/std/c.zig
407+
lib/std/c/linux.zig
408+
lib/std/coff.zig
409+
lib/std/crypto.zig
410+
lib/std/crypto/blake3.zig
411+
lib/std/crypto/siphash.zig
412+
lib/std/debug.zig
413+
lib/std/dwarf.zig
414+
lib/std/dwarf/AT.zig
415+
lib/std/dwarf/ATE.zig
416+
lib/std/dwarf/FORM.zig
417+
lib/std/dwarf/LANG.zig
418+
lib/std/dwarf/OP.zig
419+
lib/std/dwarf/TAG.zig
420+
lib/std/elf.zig
421+
lib/std/fifo.zig
422+
lib/std/fmt.zig
423+
lib/std/fmt/format_float.zig
424+
lib/std/fmt/parse_float.zig
425+
lib/std/fs.zig
426+
lib/std/fs/AtomicFile.zig
427+
lib/std/fs/Dir.zig
428+
lib/std/fs/File.zig
429+
lib/std/fs/get_app_data_dir.zig
430+
lib/std/fs/path.zig
431+
lib/std/hash.zig
432+
lib/std/hash/auto_hash.zig
433+
lib/std/hash/wyhash.zig
434+
lib/std/hash_map.zig
435+
lib/std/heap.zig
436+
lib/std/heap/arena_allocator.zig
437+
lib/std/io.zig
438+
lib/std/io/Reader.zig
439+
lib/std/io/Writer.zig
440+
lib/std/io/buffered_atomic_file.zig
441+
lib/std/io/buffered_writer.zig
442+
lib/std/io/change_detection_stream.zig
443+
lib/std/io/counting_reader.zig
444+
lib/std/io/counting_writer.zig
445+
lib/std/io/find_byte_writer.zig
446+
lib/std/io/fixed_buffer_stream.zig
447+
lib/std/io/limited_reader.zig
448+
lib/std/io/seekable_stream.zig
449+
lib/std/json.zig
450+
lib/std/json/stringify.zig
451+
lib/std/leb128.zig
452+
lib/std/linked_list.zig
453+
lib/std/log.zig
454+
lib/std/macho.zig
455+
lib/std/math.zig
456+
lib/std/math/big.zig
457+
lib/std/math/big/int.zig
458+
lib/std/math/float.zig
459+
lib/std/math/frexp.zig
460+
lib/std/math/isinf.zig
461+
lib/std/math/isnan.zig
462+
lib/std/math/log.zig
463+
lib/std/math/log10.zig
464+
lib/std/math/log2.zig
465+
lib/std/math/signbit.zig
466+
lib/std/math/sqrt.zig
467+
lib/std/mem.zig
468+
lib/std/mem/Allocator.zig
469+
lib/std/meta.zig
470+
lib/std/meta/trailer_flags.zig
471+
lib/std/multi_array_list.zig
472+
lib/std/os.zig
473+
lib/std/os/linux.zig
474+
lib/std/os/linux.zig
475+
lib/std/os/linux/IoUring.zig
476+
lib/std/os/linux/io_uring_sqe.zig
477+
lib/std/os/linux/x86_64.zig
478+
lib/std/os/linux/x86_64.zig
479+
lib/std/os/windows.zig
480+
lib/std/os/windows/ntstatus.zig
481+
lib/std/os/windows/win32error.zig
482+
lib/std/pdb.zig
483+
lib/std/process.zig
484+
lib/std/process/Child.zig
485+
lib/std/sort.zig
486+
lib/std/start.zig
487+
lib/std/static_string_map.zig
488+
lib/std/std.zig
489489
lib/std/time.zig
490490
lib/std/treap.zig
491491
lib/std/unicode.zig

lib/compiler/aro/aro/Driver.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ pub fn invokeLinker(d: *Driver, tc: *Toolchain, comptime fast_exit: bool) !void
803803
return d.fatal("unable to dump linker args: {s}", .{errorDescription(er)});
804804
};
805805
}
806-
var child = std.ChildProcess.init(argv.items, d.comp.gpa);
806+
var child = std.process.Child.init(argv.items, d.comp.gpa);
807807
// TODO handle better
808808
child.stdin_behavior = .Inherit;
809809
child.stdout_behavior = .Inherit;

lib/compiler/std-docs.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ fn buildWasmBinary(
302302
"--listen=-",
303303
});
304304

305-
var child = std.ChildProcess.init(argv.items, gpa);
305+
var child = std.process.Child.init(argv.items, gpa);
306306
child.stdin_behavior = .Pipe;
307307
child.stdout_behavior = .Pipe;
308308
child.stderr_behavior = .Pipe;
@@ -437,7 +437,7 @@ fn openBrowserTabThread(gpa: Allocator, url: []const u8) !void {
437437
.macos => "open",
438438
else => "xdg-open",
439439
};
440-
var child = std.ChildProcess.init(&.{ main_exe, url }, gpa);
440+
var child = std.process.Child.init(&.{ main_exe, url }, gpa);
441441
child.stdin_behavior = .Ignore;
442442
child.stdout_behavior = .Ignore;
443443
child.stderr_behavior = .Ignore;

lib/std/Build.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub const RunError = error{
178178
ExitCodeFailure,
179179
ProcessTerminated,
180180
ExecNotSupported,
181-
} || std.ChildProcess.SpawnError;
181+
} || std.process.Child.SpawnError;
182182

183183
pub const PkgConfigError = error{
184184
PkgConfigCrashed,
@@ -1719,15 +1719,15 @@ pub fn runAllowFail(
17191719
b: *Build,
17201720
argv: []const []const u8,
17211721
out_code: *u8,
1722-
stderr_behavior: std.ChildProcess.StdIo,
1722+
stderr_behavior: std.process.Child.StdIo,
17231723
) RunError![]u8 {
17241724
assert(argv.len != 0);
17251725

17261726
if (!process.can_spawn)
17271727
return error.ExecNotSupported;
17281728

17291729
const max_output_size = 400 * 1024;
1730-
var child = std.ChildProcess.init(argv, b.allocator);
1730+
var child = std.process.Child.init(argv, b.allocator);
17311731
child.stdin_behavior = .Ignore;
17321732
child.stdout_behavior = .Pipe;
17331733
child.stderr_behavior = stderr_behavior;

lib/std/Build/Step.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pub fn evalChildProcess(s: *Step, argv: []const []const u8) !void {
275275
try handleChildProcUnsupported(s, null, argv);
276276
try handleVerbose(s.owner, null, argv);
277277

278-
const result = std.ChildProcess.run(.{
278+
const result = std.process.Child.run(.{
279279
.allocator = arena,
280280
.argv = argv,
281281
}) catch |err| return s.fail("unable to spawn {s}: {s}", .{ argv[0], @errorName(err) });
@@ -313,7 +313,7 @@ pub fn evalZigProcess(
313313
try handleChildProcUnsupported(s, null, argv);
314314
try handleVerbose(s.owner, null, argv);
315315

316-
var child = std.ChildProcess.init(argv, arena);
316+
var child = std.process.Child.init(argv, arena);
317317
child.env_map = &b.graph.env_map;
318318
child.stdin_behavior = .Pipe;
319319
child.stdout_behavior = .Pipe;
@@ -480,7 +480,7 @@ pub inline fn handleChildProcUnsupported(
480480

481481
pub fn handleChildProcessTerm(
482482
s: *Step,
483-
term: std.ChildProcess.Term,
483+
term: std.process.Child.Term,
484484
opt_cwd: ?[]const u8,
485485
argv: []const []const u8,
486486
) error{ MakeFailed, OutOfMemory }!void {

0 commit comments

Comments
 (0)