]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: enable oomd by default in developer mode
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Oct 2020 13:53:57 +0000 (15:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Oct 2020 13:53:57 +0000 (15:53 +0200)
We want to compile the new code in CI without having to explicitly specify
-Doomd=true everywhere. Let's enable it by default, and rely on distros
setting -Dmode=release to not have it enabled by default.

meson.build
meson_options.txt

index 43cf7bf2bbf9684ea7f60373bc0cf409384a0c1c..7940a70c001ce8d82583adc4f7e4131bb5e29793 100644 (file)
@@ -1412,7 +1412,15 @@ conf.set10('ENABLE_HOMED', have)
 have = have and conf.get('HAVE_PAM') == 1
 conf.set10('ENABLE_PAM_HOME', have)
 
-have = get_option('oomd') and get_option('mode') == 'developer'
+have = get_option('oomd')
+if have == 'auto'
+        have = get_option('mode') == 'developer'
+else
+        have = have == 'true'
+        if have and get_option('mode') != 'developer'
+                error('oomd is not available in release mode (yet)')
+        endif
+endif
 conf.set10('ENABLE_OOMD', have)
 
 want_remote = get_option('remote')
index a6a0c1e4b88c8adf2072ffb2f810e183542b9257..59248c70999f1e1dcec2a99da07a275d0d4d8ab2 100644 (file)
@@ -97,7 +97,7 @@ option('coredump', type : 'boolean',
        description : 'install the coredump handler')
 option('pstore', type : 'boolean',
        description : 'install the pstore archival tool')
-option('oomd', type : 'boolean', value : 'false',
+option('oomd', type : 'combo', choices : ['auto', 'true', 'false'],
        description : 'install the userspace oom killer')
 option('logind', type : 'boolean',
        description : 'install the systemd-logind stack')