Skip to content

Commit 5381e78

Browse files
authored
Merge branch 'ziglang:master' into some-documentation-updates-0
2 parents 84ae54f + dea3ed7 commit 5381e78

File tree

358 files changed

+35966
-11528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

358 files changed

+35966
-11528
lines changed

CMakeLists.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,6 @@ set(ZIG_STAGE2_SOURCES
390390
lib/std/Io.zig
391391
lib/std/Io/Reader.zig
392392
lib/std/Io/Writer.zig
393-
lib/std/Io/buffered_atomic_file.zig
394-
lib/std/Io/buffered_writer.zig
395-
lib/std/Io/change_detection_stream.zig
396-
lib/std/Io/counting_reader.zig
397-
lib/std/Io/counting_writer.zig
398-
lib/std/Io/find_byte_writer.zig
399-
lib/std/Io/fixed_buffer_stream.zig
400-
lib/std/Io/limited_reader.zig
401-
lib/std/Io/seekable_stream.zig
402393
lib/std/Progress.zig
403394
lib/std/Random.zig
404395
lib/std/Target.zig
@@ -550,6 +541,14 @@ set(ZIG_STAGE2_SOURCES
550541
src/clang_options.zig
551542
src/clang_options_data.zig
552543
src/codegen.zig
544+
src/codegen/aarch64.zig
545+
src/codegen/aarch64/abi.zig
546+
src/codegen/aarch64/Assemble.zig
547+
src/codegen/aarch64/Disassemble.zig
548+
src/codegen/aarch64/encoding.zig
549+
src/codegen/aarch64/instructions.zon
550+
src/codegen/aarch64/Mir.zig
551+
src/codegen/aarch64/Select.zig
553552
src/codegen/c.zig
554553
src/codegen/c/Type.zig
555554
src/codegen/llvm.zig

doc/langref/build.zig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ pub fn build(b: *std.Build) void {
44
const optimize = b.standardOptimizeOption(.{});
55
const exe = b.addExecutable(.{
66
.name = "example",
7-
.root_source_file = b.path("example.zig"),
8-
.optimize = optimize,
7+
.root_module = b.createModule(.{
8+
.root_source_file = b.path("example.zig"),
9+
.optimize = optimize,
10+
}),
911
});
1012
b.default_step.dependOn(&exe.step);
1113
}

doc/langref/build_c.zig

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ pub fn build(b: *std.Build) void {
44
const lib = b.addLibrary(.{
55
.linkage = .dynamic,
66
.name = "mathtest",
7-
.root_source_file = b.path("mathtest.zig"),
7+
.root_module = b.createModule(.{
8+
.root_source_file = b.path("mathtest.zig"),
9+
}),
810
.version = .{ .major = 1, .minor = 0, .patch = 0 },
911
});
1012
const exe = b.addExecutable(.{
1113
.name = "test",
14+
.root_module = b.createModule(.{
15+
.link_libc = true,
16+
}),
1217
});
13-
exe.addCSourceFile(.{ .file = b.path("test.c"), .flags = &.{"-std=c99"} });
14-
exe.linkLibrary(lib);
15-
exe.linkSystemLibrary("c");
18+
exe.root_module.addCSourceFile(.{ .file = b.path("test.c"), .flags = &.{"-std=c99"} });
19+
exe.root_module.linkLibrary(lib);
1620

1721
b.default_step.dependOn(&exe.step);
1822

doc/langref/build_object.zig

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ const std = @import("std");
33
pub fn build(b: *std.Build) void {
44
const obj = b.addObject(.{
55
.name = "base64",
6-
.root_source_file = b.path("base64.zig"),
6+
.root_module = b.createModule(.{
7+
.root_source_file = b.path("base64.zig"),
8+
}),
79
});
810

911
const exe = b.addExecutable(.{
1012
.name = "test",
13+
.root_module = b.createModule(.{
14+
.link_libc = true,
15+
}),
1116
});
12-
exe.addCSourceFile(.{ .file = b.path("test.c"), .flags = &.{"-std=c99"} });
13-
exe.addObject(obj);
14-
exe.linkSystemLibrary("c");
17+
exe.root_module.addCSourceFile(.{ .file = b.path("test.c"), .flags = &.{"-std=c99"} });
18+
exe.root_module.addObject(obj);
1519
b.installArtifact(exe);
1620
}
1721

lib/compiler/build_runner.zig

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -696,8 +696,11 @@ fn runStepNames(
696696
.failures, .none => true,
697697
else => false,
698698
};
699-
if (failure_count == 0 and failures_only) {
700-
return run.cleanExit();
699+
if (failure_count == 0) {
700+
std.Progress.setStatus(.success);
701+
if (failures_only) return run.cleanExit();
702+
} else {
703+
std.Progress.setStatus(.failure);
701704
}
702705

703706
const ttyconf = run.ttyconf;
@@ -708,7 +711,7 @@ fn runStepNames(
708711

709712
const total_count = success_count + failure_count + pending_count + skipped_count;
710713
ttyconf.setColor(w, .cyan) catch {};
711-
w.writeAll("Build Summary:") catch {};
714+
w.writeAll("\nBuild Summary:") catch {};
712715
ttyconf.setColor(w, .reset) catch {};
713716
w.print(" {d}/{d} steps succeeded", .{ success_count, total_count }) catch {};
714717
if (skipped_count > 0) w.print("; {d} skipped", .{skipped_count}) catch {};
@@ -1149,6 +1152,7 @@ fn workerMakeOneStep(
11491152
} else |err| switch (err) {
11501153
error.MakeFailed => {
11511154
@atomicStore(Step.State, &s.state, .failure, .seq_cst);
1155+
std.Progress.setStatus(.failure_working);
11521156
break :handle_result;
11531157
},
11541158
error.MakeSkipped => @atomicStore(Step.State, &s.state, .skipped, .seq_cst),

0 commit comments

Comments
 (0)