Rollup merge of #94819 - jonhoo:configure-empty-list, r=Mark-Simulacrum
configure: don't serialize empty array elements Before this change: $ ./configure --codegen-backends= [..] $ grep -P '^codegen-backends' config.toml codegen-backends = [''] After this change: $ ./configure --codegen-backends= [..] $ grep -P '^codegen-backends' config.toml codegen-backends = []
This commit is contained in:
commit
bb8274ad36
@ -279,6 +279,10 @@ def build():
|
||||
|
||||
|
||||
def set(key, value):
|
||||
if isinstance(value, list):
|
||||
# Remove empty values, which value.split(',') tends to generate.
|
||||
value = [v for v in value if v]
|
||||
|
||||
s = "{:20} := {}".format(key, value)
|
||||
if len(s) < 70:
|
||||
p(s)
|
||||
|
Loading…
Reference in New Issue
Block a user