diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-11-09 10:36:39 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-01-12 14:09:06 +0100 |
commit | a70248dbd381b2ce82192acdcbc3bde441e6c29b (patch) | |
tree | 5d299adb81c61c55fb63f341075917249c8e46dc /scripts | |
parent | 9da9be2c26f509728106db591538bfa2eee03947 (diff) | |
download | qemu-a70248dbd381b2ce82192acdcbc3bde441e6c29b.zip qemu-a70248dbd381b2ce82192acdcbc3bde441e6c29b.tar.gz qemu-a70248dbd381b2ce82192acdcbc3bde441e6c29b.tar.bz2 |
configure: parse --enable/--disable-strip automatically, flip default
Always include the STRIP variable in config-host.mak (it's only used
by the s390-ccw firmware build, and it adds a default if configure
omitted it), and use meson-buildoptions.sh to turn
--enable/--disable-strip into -Dstrip.
The default is now not to strip the binaries like for almost every other
package that has a configure script.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/meson-buildoptions.py | 21 | ||||
-rw-r--r-- | scripts/meson-buildoptions.sh | 3 |
2 files changed, 17 insertions, 7 deletions
diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 96969d8..98ae944 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -36,6 +36,10 @@ SKIP_OPTIONS = { "trace_file", } +BUILTIN_OPTIONS = { + "strip", +} + LINE_WIDTH = 76 @@ -90,14 +94,17 @@ def allow_arg(opt): return not (set(opt["choices"]) <= {"auto", "disabled", "enabled"}) +def filter_options(json): + if ":" in json["name"]: + return False + if json["section"] == "user": + return json["name"] not in SKIP_OPTIONS + else: + return json["name"] in BUILTIN_OPTIONS + + def load_options(json): - json = [ - x - for x in json - if x["section"] == "user" - and ":" not in x["name"] - and x["name"] not in SKIP_OPTIONS - ] + json = [x for x in json if filter_options(x)] return sorted(json, key=lambda x: x["name"]) diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 50bd7be..a4af02c 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -13,6 +13,7 @@ meson_options_help() { printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-slirp[=CHOICE] Whether and how to find the slirp library' printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)' + printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter (slow)' printf "%s\n" ' --enable-trace-backends=CHOICE' printf "%s\n" ' Set available tracing backends [log] (choices:' @@ -237,6 +238,8 @@ _meson_option_parse() { --disable-spice) printf "%s" -Dspice=disabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=enabled ;; --disable-spice-protocol) printf "%s" -Dspice_protocol=disabled ;; + --enable-strip) printf "%s" -Dstrip=true ;; + --disable-strip) printf "%s" -Dstrip=false ;; --enable-tcg) printf "%s" -Dtcg=enabled ;; --disable-tcg) printf "%s" -Dtcg=disabled ;; --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=true ;; |