diff --git a/build.zig b/build.zig
index 45bd314..02926f0 100644
--- a/build.zig
+++ b/build.zig
@@ -13,6 +13,7 @@ pub fn build(b: *std.build.Builder) void {
     exe.addCSourceFile("src/ncurses_refs.c", &[_][]const u8{});
     exe.linkLibC();
     exe.linkSystemLibrary("ncursesw");
+    exe.pie = true;
     exe.install();
 
     const run_cmd = exe.run();
