From cbc05e0b1d86d57b533abeedc97e6fb6a648c64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 5 Dec 2024 10:02:07 +0100 Subject: [PATCH] Compilation: Consider *.rlib files to be static libraries. These are produced by rustc: https://rustc-dev-guide.rust-lang.org/backend/libs-and-metadata.html#rlib --- src/Compilation.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Compilation.zig b/src/Compilation.zig index ad3fcc1c829b..a7d3b6b437e6 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -5890,7 +5890,9 @@ pub fn hasObjectExt(filename: []const u8) bool { } pub fn hasStaticLibraryExt(filename: []const u8) bool { - return mem.endsWith(u8, filename, ".a") or mem.endsWith(u8, filename, ".lib"); + return mem.endsWith(u8, filename, ".a") or + mem.endsWith(u8, filename, ".lib") or + mem.endsWith(u8, filename, ".rlib"); } pub fn hasCExt(filename: []const u8) bool {