From 08ee32b6330ff753b2c49e8bf93de93e6fa6f936 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 27 Sep 2024 10:50:43 -0700 Subject: [PATCH] Forward std_options from entrypoint in main.zig --- src/main.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.zig b/src/main.zig index a1f8d4a44..895ccfe48 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,3 +1,4 @@ +const std = @import("std"); const build_config = @import("build_config.zig"); /// See build_config.ExeEntrypoint for why we do this. @@ -16,6 +17,12 @@ const entrypoint = switch (build_config.exe_entrypoint) { /// The main entrypoint for the program. pub const main = entrypoint.main; +/// Standard options such as logger overrides. +pub const std_options: std.Options = if (@hasDecl(entrypoint, "std_options")) + entrypoint.std_options +else + .{}; + test { _ = entrypoint; }