tools: build all tools in ci to prevent bitrot

No LLVM assertions were triggered for me.
Closes #12015
Closes #12022
Closes #12223
This commit is contained in:
Jan Philipp Hafer 2023-01-05 18:38:09 +01:00 committed by Veikka Tuominen
parent 176940b504
commit 301a89849b
3 changed files with 11 additions and 23 deletions

View File

@ -84,30 +84,20 @@ pub fn addCases(cases: *tests.StandaloneContext) void {
}
cases.addBuildFile("test/standalone/issue_12706/build.zig", .{});
// Ensure the development tools are buildable.
// Disabled due to tripping LLVM 13 assertion:
// https://github.com/ziglang/zig/issues/12015
//cases.add("tools/gen_spirv_spec.zig");
if (builtin.zig_backend == .stage1) { // https://github.com/ziglang/zig/issues/12223
cases.add("tools/gen_stubs.zig");
}
// Ensure the development tools are buildable. Alphabetically sorted.
// No need to build `tools/spirv/grammar.zig`.
cases.add("tools/extract-grammar.zig");
cases.add("tools/gen_outline_atomics.zig");
cases.add("tools/gen_spirv_spec.zig");
cases.add("tools/gen_stubs.zig");
cases.add("tools/generate_linux_syscalls.zig");
cases.add("tools/process_headers.zig");
cases.add("tools/update-license-headers.zig");
cases.add("tools/update-linux-headers.zig");
// Disabled due to tripping LLVM 13 assertion:
// https://github.com/ziglang/zig/issues/12022
//cases.add("tools/update_clang_options.zig");
cases.add("tools/update_clang_options.zig");
cases.add("tools/update_cpu_features.zig");
cases.add("tools/update_glibc.zig");
// Disabled due to tripping LLVM 13 assertion:
// https://github.com/ziglang/zig/issues/12015
//cases.add("tools/update_spirv_features.zig");
cases.add("tools/update_spirv_features.zig");
cases.addBuildFile("test/standalone/issue_13030/build.zig", .{ .build_modes = true });
cases.addBuildFile("test/standalone/emit_asm_and_bin/build.zig", .{});

View File

@ -38,12 +38,10 @@ const Buffer = struct {
/// be byte-indexed with a u32 integer.
const max_src_size = std.math.maxInt(u32);
var stdout = io.getStdOut().writer();
pub fn main() !void {
const stdout_wr = io.getStdOut().writer();
var arena = heap.ArenaAllocator.init(heap.page_allocator);
defer arena.deinit(); // NOTE(mperillo): Can be removed.
const allocator = arena.allocator();
var args_it = try process.argsWithAllocator(allocator);
@ -77,7 +75,7 @@ pub fn main() !void {
if (mem.indexOf(u8, doc, "<-") != null) {
// Separate each doc with an empty line. This in turn will
// ensure that rules are separate by an empty line.
try stdout.print("{s}\n", .{doc});
try stdout_wr.print("{s}\n", .{doc});
}
},
else => {},

View File

@ -437,7 +437,7 @@ fn parseElf(parse: Parse, comptime is_64: bool, comptime endian: builtin.Endian)
const dynstr = elf_bytes[dynstr_offset..];
// Sort the list by address, ascending.
std.sort.sort(Sym, dyn_syms, {}, S.symbolAddrLessThan);
std.sort.sort(Sym, @alignCast(8, dyn_syms), {}, S.symbolAddrLessThan);
for (dyn_syms) |sym| {
const this_section = s(sym.st_shndx);