aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
diff options
context:
space:
mode:
authorSébastien Marie <semarie@online.fr>2020-10-11 08:23:36 +0000
committerSébastien Marie <semarie@online.fr>2020-10-11 08:23:36 +0000
commitf33a610c84313255477cc04d930b02ad984118ae (patch)
tree6451483302a0c8924fd26ca48c84cfa88617c80b /src/target.zig
parenta31b70c4b8d0bed67463b2f54e74198baa93329f (diff)
downloadzig-f33a610c84313255477cc04d930b02ad984118ae.tar.gz
zig-f33a610c84313255477cc04d930b02ad984118ae.zip
add minimal openbsd support
Diffstat (limited to 'src/target.zig')
-rw-r--r--src/target.zig4
1 files changed, 2 insertions, 2 deletions
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.