Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bb8274a

Browse files
authoredMar 11, 2022
Rollup merge of rust-lang#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 = []
2 parents 6d66020 + 7c20a29 commit bb8274a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/bootstrap/configure.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ def build():
279279

280280

281281
def set(key, value):
282+
if isinstance(value, list):
283+
# Remove empty values, which value.split(',') tends to generate.
284+
value = [v for v in value if v]
285+
282286
s = "{:20} := {}".format(key, value)
283287
if len(s) < 70:
284288
p(s)

0 commit comments

Comments
 (0)
This repository has been archived.