build: use -Ddevelopment=true to set DEVELOPMENT_BUILD

And also, we use it as #ifdef, so never define it as 0.
This commit is contained in:
Christian Hergert
2022-07-22 12:53:25 -07:00
parent 5298e67d12
commit 97633fd011
3 changed files with 9 additions and 1 deletions

View File

@ -90,7 +90,9 @@ if get_option('libunwind')
endif
# Development build setup
config_h.set('DEVELOPMENT_BUILD', version_split[1].to_int().is_odd())
if get_option('development')
config_h.set10('DEVELOPMENT_BUILD', true)
endif
has_use_clockid = cc.has_member('struct perf_event_attr', 'use_clockid', prefix: '#include <linux/perf_event.h>')
has_clockid = cc.has_member('struct perf_event_attr', 'clockid', prefix: '#include <linux/perf_event.h>')

View File

@ -1,3 +1,8 @@
# If this is a development build, which is used for our Flatpak build
# so that we have a different app-id (.Devel suffix) than the regular
# application.
option('development', type: 'boolean', value: 'false')
# Optionally disable the GTK application in case you're building the
# sysprof-cli only for your platform. Might be useful in IoT or various
# server scenarios.

View File

@ -104,6 +104,7 @@
"--libdir=/app/lib",
"--buildtype=debugoptimized",
"-Dagent=true",
"-Ddevelopment=true",
"-Dlibsysprof=true",
"-Dgtk=true",
"-Dsysprofd=host"