From fff3c1fff4c3ebfcb2bd4f08a43ae7815b5c446b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 12 Dec 2019 18:27:17 -0500 Subject: un-special-case startup code in the std lib Previously, the compiler had special logic to determine whether to include the startup code, which was in `std/special/start.zig`. Now, the file is moved to `std/start.zig`, and there is no special logic in the compiler. Instead, the standard library unconditionally imports the `start.zig` file, which then has a `comptime` block that does the logic of determining what, if any, start symbols to export. Instead of `start.zig` being in its own special package, it is just another normal file that is part of the standard library. `std.builtin.TestFn` is now part of the standard library rather than specially generated by the compiler. --- lib/std/builtin.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/std/builtin.zig') diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index 5b7051eafb..687e169bbe 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -412,6 +412,13 @@ pub const CallOptions = struct { }; }; +/// This function type is used by the Zig language code generation and +/// therefore must be kept in sync with the compiler implementation. +pub const TestFn = struct { + name: []const u8, + func: fn()anyerror!void, +}; + /// This function type is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. pub const PanicFn = fn ([]const u8, ?*StackTrace) noreturn; -- cgit v1.2.3