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>
This commit is contained in:
Paolo Bonzini 2021-11-09 10:36:39 +01:00
parent 9da9be2c26
commit a70248dbd3
4 changed files with 18 additions and 18 deletions

View file

@ -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"])