From acf8268359a8c7737e6592ed729908511c0cbf79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 7 Aug 2024 13:17:14 +0200 Subject: [PATCH] Handle `-(-)pie` linker option. --- src/main.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.zig b/src/main.zig index 2733faa72b4c..3037da1bd7db 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1981,6 +1981,8 @@ fn buildOutputType( needed = false; } else if (mem.eql(u8, linker_arg, "--no-as-needed") or mem.eql(u8, linker_arg, "-no-as-needed")) { needed = true; + } else if (mem.eql(u8, linker_arg, "--pie") or mem.eql(u8, linker_arg, "-pie")) { + create_module.opts.pie = true; } else if (mem.eql(u8, linker_arg, "--no-pie") or mem.eql(u8, linker_arg, "-no-pie") or mem.eql(u8, linker_arg, "-no_pie")) {