diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-26 19:34:18 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-26 19:34:18 +0000 |
| commit | ae6a656f4963b8cc5bde13fa347cfd4b76a4d4a5 (patch) | |
| tree | 10df544d739f65e066ebb04d005d612e713c3ba1 | |
| parent | meson: build source files common to both foot and footclient as libraries (diff) | |
meson: only build the pgo helper binary when -Db_pgo=generate
This is the only time it’s needed.
In non-PGO builds, it is completely unnecessary, and we’re only
wasting CPU cycles building it.
In full PGO builds, with -Db_pgo=use, we get link warnings and/or
failures, depending on compiler, since the pgo binary hasn’t been
executed.
| -rw-r--r-- | meson.build | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/meson.build b/meson.build index 237d99c6..54e5b315 100644 --- a/meson.build +++ b/meson.build @@ -155,13 +155,15 @@ pgolib = static_library( link_with: vtlib, ) -executable( - 'pgo', - 'pgo/pgo.c', - wl_proto_src + wl_proto_headers, - dependencies: [math, threads, libepoll, pixman, wayland_client, fcft, tllist], - link_with: pgolib, -) +if get_option('b_pgo') == 'generate' + executable( + 'pgo', + 'pgo/pgo.c', + wl_proto_src + wl_proto_headers, + dependencies: [math, threads, libepoll, pixman, wayland_client, fcft, tllist], + link_with: pgolib, + ) +endif executable( 'foot', |
