From f33a610c84313255477cc04d930b02ad984118ae Mon Sep 17 00:00:00 2001 From: Sébastien Marie Date: Sun, 11 Oct 2020 08:23:36 +0000 Subject: add minimal openbsd support --- src/target.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/target.zig') diff --git a/src/target.zig b/src/target.zig index d009cf8556..8af6ef9d9b 100644 --- a/src/target.zig +++ b/src/target.zig @@ -123,7 +123,7 @@ pub fn cannotDynamicLink(target: std.Target) bool { /// since this is the stable syscall interface. pub fn osRequiresLibC(target: std.Target) bool { return switch (target.os.tag) { - .freebsd, .netbsd, .dragonfly, .macosx, .ios, .watchos, .tvos => true, + .freebsd, .netbsd, .dragonfly, .openbsd, .macosx, .ios, .watchos, .tvos => true, else => false, }; } @@ -143,7 +143,7 @@ pub fn libcNeedsLibUnwind(target: std.Target) bool { } pub fn requiresPIE(target: std.Target) bool { - return target.isAndroid() or target.isDarwin(); + return target.isAndroid() or target.isDarwin() or target.os.tag == .openbsd; } /// This function returns whether non-pic code is completely invalid on the given target. -- cgit v1.2.3