Rollup merge of #108644 - KittyBorgX:hashmap-toml, r=albertlarsan68

Allow setting hashmap toml values in `./configure`

Fixes https://github.com/rust-lang/rust/issues/108621
This commit is contained in:
Matthias Krüger 2023-03-02 23:05:30 +01:00 committed by GitHub
commit 8a21bcee25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,6 +442,8 @@ def to_toml(value):
return value return value
else: else:
return "'" + value + "'" return "'" + value + "'"
elif isinstance(value, dict):
return "{" + ", ".join(map(lambda a: "{} = {}".format(to_toml(a[0]), to_toml(a[1])), value.items())) + "}"
else: else:
raise RuntimeError('no toml') raise RuntimeError('no toml')