From e43d22ba3f203f7bbc0352dbf5af045ef2865aa4 Mon Sep 17 00:00:00 2001 From: Eric Joldasov Date: Thu, 6 Mar 2025 01:20:20 +0500 Subject: [PATCH] build.zig: change `-Dpie` option default to be target-dependant `null` here indicates to Zig that it should decide for itself whether to enable PIE or not. On some targets (like macOS or OpenBSD), it is required and so current default will cause unneccessary build error. Behavior for `-Dpie=false` and `-Dpie=true` is not changed. Signed-off-by: Eric Joldasov --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig b/build.zig index 6ad4531..b1708a4 100644 --- a/build.zig +++ b/build.zig @@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); - const pie = b.option(bool, "pie", "Build with PIE support (by default false)") orelse false; + const pie = b.option(bool, "pie", "Build with PIE support (by default: target-dependant)"); const strip = b.option(bool, "strip", "Strip debugging info (by default false)") orelse false; const main_mod = b.createModule(.{