Lines Matching +full:type +full:- +full:value
28 # Options with nonstandard names (e.g. --with/--without) or OS-dependent
40 "coroutine_backend": "with-coroutine",
41 "debug": "debug-info",
42 "malloc": "enable-malloc",
43 "pkgversion": "with-pkgversion",
45 "qemu_suffix": "with-suffix",
46 "trace_backends": "enable-trace-backends",
47 "trace_file": "with-trace-file",
58 # via -D, because it's a mix of CFLAGS and --extra-cflags); for specific
59 # cases "../configure -D" can be used as an escape hatch.
81 # Convert the default value of an option to the string used in
86 value = opt["value"]
87 if isinstance(value, list):
88 return ",".join(value)
89 if isinstance(value, bool):
90 return "enabled" if value else "disabled"
91 return str(value)
113 value = get_help(opt)
114 if value != "auto" and value != "":
115 right += f" [{value}]"
128 if opt["type"] == "boolean":
130 if opt["type"] != "combo":
140 if opt["type"] == "boolean":
142 if opt["type"] != "combo":
165 return name.replace("_", "-")
172 if opt["type"] == "boolean" and opt["value"]:
173 return f"disable-{key}"
174 return f"enable-{key}"
178 if opt["type"] == "string":
179 return "VALUE"
180 if opt["type"] == "array":
194 left = f"--{key}={metavar}"
196 elif opt["type"] == "boolean" and opt["name"] not in AUTO_OPTIONS:
197 left = f"--{key}"
200 if opt["type"] == "combo" and "enabled" in opt["choices"]:
201 left = f"--{key}[=CHOICE]"
203 left = f"--{key}=CHOICE"
209 sh_print("Optional features, enabled with --enable-FEATURE and")
210 sh_print("disabled with --disable-FEATURE, default is enabled if available")
211 sh_print("(unless built with --without-default-features):")
226 if opt["type"] == "array" and not "choices" in opt:
227 print(f' --{key}=*) quote_sh "-D{name}=$(meson_option_build_array $2)" ;;')
229 print(f' --{key}=*) quote_sh "-D{name}=$2" ;;')
230 elif opt["type"] == "boolean":
231 print(f' --enable-{key}) printf "%s" -D{name}=true ;;')
232 print(f' --disable-{key}) printf "%s" -D{name}=false ;;')
234 if opt["type"] == "combo" and "enabled" in opt["choices"]:
235 print(f' --enable-{key}) printf "%s" -D{name}=enabled ;;')
236 if opt["type"] == "combo" and "disabled" in opt["choices"]:
237 print(f' --disable-{key}) printf "%s" -D{name}=disabled ;;')
239 print(f' --enable-{key}=*) quote_sh "-D{name}=$2" ;;')
248 print("Failure in scripts/meson-buildoptions.py parsing stdin as json",
252 print("# This file is generated by meson-buildoptions.py, do not edit!")