Skip to content

Commit 301a898

Browse files
Jan Philipp HaferVexu
authored andcommitted
tools: build all tools in ci to prevent bitrot
No LLVM assertions were triggered for me. Closes #12015 Closes #12022 Closes #12223
1 parent 176940b commit 301a898

File tree

3 files changed

+11
-23
lines changed

3 files changed

+11
-23
lines changed

test/standalone.zig

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,30 +84,20 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
8484
}
8585
cases.addBuildFile("test/standalone/issue_12706/build.zig", .{});
8686

87-
// Ensure the development tools are buildable.
88-
89-
// Disabled due to tripping LLVM 13 assertion:
90-
// https://github.com/ziglang/zig/issues/12015
91-
//cases.add("tools/gen_spirv_spec.zig");
92-
93-
if (builtin.zig_backend == .stage1) { // https://github.com/ziglang/zig/issues/12223
94-
cases.add("tools/gen_stubs.zig");
95-
}
87+
// Ensure the development tools are buildable. Alphabetically sorted.
88+
// No need to build `tools/spirv/grammar.zig`.
89+
cases.add("tools/extract-grammar.zig");
90+
cases.add("tools/gen_outline_atomics.zig");
91+
cases.add("tools/gen_spirv_spec.zig");
92+
cases.add("tools/gen_stubs.zig");
9693
cases.add("tools/generate_linux_syscalls.zig");
9794
cases.add("tools/process_headers.zig");
9895
cases.add("tools/update-license-headers.zig");
9996
cases.add("tools/update-linux-headers.zig");
100-
101-
// Disabled due to tripping LLVM 13 assertion:
102-
// https://github.com/ziglang/zig/issues/12022
103-
//cases.add("tools/update_clang_options.zig");
104-
97+
cases.add("tools/update_clang_options.zig");
10598
cases.add("tools/update_cpu_features.zig");
10699
cases.add("tools/update_glibc.zig");
107-
108-
// Disabled due to tripping LLVM 13 assertion:
109-
// https://github.com/ziglang/zig/issues/12015
110-
//cases.add("tools/update_spirv_features.zig");
100+
cases.add("tools/update_spirv_features.zig");
111101

112102
cases.addBuildFile("test/standalone/issue_13030/build.zig", .{ .build_modes = true });
113103
cases.addBuildFile("test/standalone/emit_asm_and_bin/build.zig", .{});

tools/extract-grammar.zig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ const Buffer = struct {
3838
/// be byte-indexed with a u32 integer.
3939
const max_src_size = std.math.maxInt(u32);
4040

41-
var stdout = io.getStdOut().writer();
42-
4341
pub fn main() !void {
42+
const stdout_wr = io.getStdOut().writer();
4443
var arena = heap.ArenaAllocator.init(heap.page_allocator);
4544
defer arena.deinit(); // NOTE(mperillo): Can be removed.
46-
4745
const allocator = arena.allocator();
4846

4947
var args_it = try process.argsWithAllocator(allocator);
@@ -77,7 +75,7 @@ pub fn main() !void {
7775
if (mem.indexOf(u8, doc, "<-") != null) {
7876
// Separate each doc with an empty line. This in turn will
7977
// ensure that rules are separate by an empty line.
80-
try stdout.print("{s}\n", .{doc});
78+
try stdout_wr.print("{s}\n", .{doc});
8179
}
8280
},
8381
else => {},

tools/gen_stubs.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ fn parseElf(parse: Parse, comptime is_64: bool, comptime endian: builtin.Endian)
437437
const dynstr = elf_bytes[dynstr_offset..];
438438

439439
// Sort the list by address, ascending.
440-
std.sort.sort(Sym, dyn_syms, {}, S.symbolAddrLessThan);
440+
std.sort.sort(Sym, @alignCast(8, dyn_syms), {}, S.symbolAddrLessThan);
441441

442442
for (dyn_syms) |sym| {
443443
const this_section = s(sym.st_shndx);

0 commit comments

Comments
 (0)