Ensure that cflags is honoured when linking cprograms. (Needed for -pg to
authorDavid Given <dg@cowlark.com>
Thu, 15 Dec 2016 23:34:57 +0000 (00:34 +0100)
committerDavid Given <dg@cowlark.com>
Thu, 15 Dec 2016 23:34:57 +0000 (00:34 +0100)
work.)

first/build.lua

index 85df519..60d1954 100644 (file)
@@ -220,7 +220,7 @@ definerule("cprogram",
                commands = {
                        type="strings",
                        default={
-                               "$(CC) -o %{outs[1]} -Wl,--start-group %{ins} -Wl,--end-group"
+                               "$(CC) %{cflags} -o %{outs[1]} -Wl,--start-group %{ins} -Wl,--end-group"
                        },
                }
        },