diff --git a/test/cases/f32_passed_to_variadic_fn.zig b/test/cases/f32_passed_to_variadic_fn.zig index c029b4b69f..4ae1d2cf08 100644 --- a/test/cases/f32_passed_to_variadic_fn.zig +++ b/test/cases/f32_passed_to_variadic_fn.zig @@ -9,7 +9,8 @@ pub fn main() void { // run // backend=llvm // target=x86_64-linux-gnu +// link_libc=1 // // f64: 2.000000 // f32: 10.000000 -// \ No newline at end of file +// diff --git a/test/cases/fn_typeinfo_passed_to_comptime_fn.zig b/test/cases/fn_typeinfo_passed_to_comptime_fn.zig index 31673e5b81..fb64788126 100644 --- a/test/cases/fn_typeinfo_passed_to_comptime_fn.zig +++ b/test/cases/fn_typeinfo_passed_to_comptime_fn.zig @@ -14,4 +14,5 @@ fn foo(comptime info: std.builtin.Type) !void { // run // is_test=1 +// backend=llvm // diff --git a/test/cases/llvm/hello_world.zig b/test/cases/llvm/hello_world.zig index 4243191b0f..0f75f624ec 100644 --- a/test/cases/llvm/hello_world.zig +++ b/test/cases/llvm/hello_world.zig @@ -7,6 +7,7 @@ pub fn main() void { // run // backend=llvm // target=x86_64-linux,x86_64-macos +// link_libc=1 // // hello world! // diff --git a/test/src/Cases.zig b/test/src/Cases.zig index 6affe968d1..c3a4c1df47 100644 --- a/test/src/Cases.zig +++ b/test/src/Cases.zig @@ -382,6 +382,7 @@ fn addFromDirInner( const backends = try manifest.getConfigForKeyAlloc(ctx.arena, "backend", Backend); const targets = try manifest.getConfigForKeyAlloc(ctx.arena, "target", CrossTarget); const is_test = try manifest.getConfigForKeyAssertSingle("is_test", bool); + const link_libc = try manifest.getConfigForKeyAssertSingle("link_libc", bool); const output_mode = try manifest.getConfigForKeyAssertSingle("output_mode", std.builtin.OutputMode); var cases = std.ArrayList(usize).init(ctx.arena); @@ -397,7 +398,7 @@ fn addFromDirInner( .updates = std.ArrayList(Cases.Update).init(ctx.cases.allocator), .is_test = is_test, .output_mode = output_mode, - .link_libc = backend == .llvm, + .link_libc = link_libc, .deps = std.ArrayList(DepModule).init(ctx.cases.allocator), }); try cases.append(next); @@ -745,6 +746,8 @@ const TestManifestConfigDefaults = struct { }; } else if (std.mem.eql(u8, key, "is_test")) { return "0"; + } else if (std.mem.eql(u8, key, "link_libc")) { + return "0"; } else unreachable; } };