commit 11efe4e

Emilia Smólska  ·  2026-08-08 00:53:24 +0000 UTC
parent b167d74
-s is a linking flag
1 files changed,  +8, -4
+8, -4
 1@@ -124,11 +124,10 @@ return function(argv)
 2       table.concat({
 3          no_color and "-fno-diagnostics-color" or "-fdiagnostics-color",
 4          "-Wall -Wextra -Wpedantic",
 5-         -- XXX: -s or strip when installing? should research more
 6          ({
 7             debug = "-g",
 8-            smol = "-Os -s",
 9-            zomg = "-O3 -s"
10+            smol = "-Os",
11+            zomg = "-O3"
12          })[build_type],
13          "-fno-semantic-interposition",
14          neu.str("CFLAGS", ""),
15@@ -136,7 +135,12 @@ return function(argv)
16    )
17    writevar(
18       "ldflags",
19-      "-static " .. neu.str("LDFLAGS", "")
20+      table.concat({
21+         "-static",
22+         -- XXX: -s or strip when installing? should research more
23+         build_type == "debug" and "" or "-s",
24+         neu.str("LDFLAGS", ""),
25+      }, " ")
26    )
27    writerule("ar", {
28       command = "$ar rcs $out $in",