diff options
| author | Frank Denis <github@pureftpd.org> | 2020-10-14 18:36:48 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-14 18:19:57 -0700 |
| commit | c0e9d3fb86330ab56ae450fa3e7ffff8fe87b49e (patch) | |
| tree | 1a07172c3daeaf8123b49607a2dd33d93c6f3835 /src/Compilation.zig | |
| parent | 477798b37ec034bacb4502b481597317d3950481 (diff) | |
| download | zig-c0e9d3fb86330ab56ae450fa3e7ffff8fe87b49e.tar.gz zig-c0e9d3fb86330ab56ae450fa3e7ffff8fe87b49e.zip | |
Classify .tbd files as shared libraries
On macOS, a .tbd ("text-based dylib definition") file is a shared library
stub, allowing symbols to be defined only once for all the architectures
the library was compiled for.
.tbd files can be linked like .dylib files.
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 1fddda42f9..1b32a80279 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2012,7 +2012,8 @@ pub fn hasAsmExt(filename: []const u8) bool { pub fn hasSharedLibraryExt(filename: []const u8) bool { if (mem.endsWith(u8, filename, ".so") or mem.endsWith(u8, filename, ".dll") or - mem.endsWith(u8, filename, ".dylib")) + mem.endsWith(u8, filename, ".dylib") or + mem.endsWith(u8, filename, ".tbd")) { return true; } |
