aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-12-05 10:02:07 +0100
committerAlex Rønne Petersen <alex@alexrp.com>2024-12-05 15:05:55 +0100
commitcbc05e0b1d86d57b533abeedc97e6fb6a648c64b (patch)
treebab6f8017a9a7438862d76fe0d58fde949975627 /src/Compilation.zig
parentd70be200d8a388c3fd23aa0e246322300443d58a (diff)
downloadzig-cbc05e0b1d86d57b533abeedc97e6fb6a648c64b.tar.gz
zig-cbc05e0b1d86d57b533abeedc97e6fb6a648c64b.zip
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
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index ad3fcc1c82..a7d3b6b437 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 {