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.
This commit is contained in:
InKryption 2022-10-17 19:52:27 +02:00 committed by GitHub
parent 5304bee276
commit bf5377201f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 "-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.setTarget(target);
raylib.linkLibC(); raylib.linkLibC();