authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2020-10-14 18:36:48+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-14 18:19:57-07:00
logc0e9d3fb86330ab56ae450fa3e7ffff8fe87b49e
tree1a07172c3daeaf8123b49607a2dd33d93c6f3835
parent477798b37ec034bacb4502b481597317d3950481

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.

1 files changed, 2 insertions(+), 1 deletions(-)

src/Compilation.zig+2-1
......@@ -2012,7 +2012,8 @@ pub fn hasAsmExt(filename: []const u8) bool {
20122012pub fn hasSharedLibraryExt(filename: []const u8) bool {
20132013 if (mem.endsWith(u8, filename, ".so") or
20142014 mem.endsWith(u8, filename, ".dll") or
2015 mem.endsWith(u8, filename, ".dylib"))
2015 mem.endsWith(u8, filename, ".dylib") or
2016 mem.endsWith(u8, filename, ".tbd"))
20162017 {
20172018 return true;
20182019 }