build: add -Dstrip and -Dpie build options
This commit is contained in:
parent
ded490d3dd
commit
3cb6428da6
@ -16,6 +16,9 @@ pub fn build(b: *zbs.Builder) !void {
|
|||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const mode = b.standardReleaseOptions();
|
const mode = b.standardReleaseOptions();
|
||||||
|
|
||||||
|
const strip = b.option(bool, "strip", "Omit debug information") orelse false;
|
||||||
|
const pie = b.option(bool, "pie", "Build a Position Independent Executable") orelse false;
|
||||||
|
|
||||||
const man_pages = b.option(
|
const man_pages = b.option(
|
||||||
bool,
|
bool,
|
||||||
"man-pages",
|
"man-pages",
|
||||||
@ -123,6 +126,8 @@ pub fn build(b: *zbs.Builder) !void {
|
|||||||
|
|
||||||
addServerDeps(river, scanner);
|
addServerDeps(river, scanner);
|
||||||
|
|
||||||
|
river.strip = strip;
|
||||||
|
river.pie = pie;
|
||||||
river.install();
|
river.install();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +148,8 @@ pub fn build(b: *zbs.Builder) !void {
|
|||||||
|
|
||||||
scanner.addCSource(riverctl);
|
scanner.addCSource(riverctl);
|
||||||
|
|
||||||
|
riverctl.strip = strip;
|
||||||
|
riverctl.pie = pie;
|
||||||
riverctl.install();
|
riverctl.install();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,6 +170,8 @@ pub fn build(b: *zbs.Builder) !void {
|
|||||||
|
|
||||||
scanner.addCSource(rivertile);
|
scanner.addCSource(rivertile);
|
||||||
|
|
||||||
|
rivertile.strip = strip;
|
||||||
|
rivertile.pie = pie;
|
||||||
rivertile.install();
|
rivertile.install();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user