From bf5377201f59e4e2b3b247c553b8a809aec3420c Mon Sep 17 00:00:00 2001 From: InKryption <59504965+InKryption@users.noreply.github.com> Date: Mon, 17 Oct 2022 19:52:27 +0200 Subject: [PATCH] build.zig: set root_src param to `null` Supplying the header file as the root source here appears to cause a linker warning of the form: ``` LLD Link... warning(link): unexpected LLD stderr: ld.lld: warning: {build_root}/zig-cache/o/{hash}/libraylib.a: archive member '{build_root}/zig-cache/o/{hash}/raylib.o' is neither ET_REL nor LLVM bitcode ``` Passing `null` instead fixes it. --- src/build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.zig b/src/build.zig index 23f48110a..6a4c07e7e 100644 --- a/src/build.zig +++ b/src/build.zig @@ -9,7 +9,7 @@ pub fn addRaylib(b: *std.build.Builder, target: std.zig.CrossTarget) *std.build. "-fno-sanitize=undefined", // https://github.com/raysan5/raylib/issues/1891 }; - const raylib = b.addStaticLibrary("raylib", srcdir ++ "/raylib.h"); + const raylib = b.addStaticLibrary("raylib", null); raylib.setTarget(target); raylib.linkLibC();