[compiler-rt] Support default-True lit config options (follow up to #174522) (#174642)

The option added in #174522 breaks simulator tests, since `set_default`
overrides `False` values with the default.

Since these options are either string or boolean, this patches
set_default to override only un-set or empty string values (empty string
is not truth-y and therefore would be overwritten by defaults currently,
so this is NFCI)
This commit is contained in:
Andrew Haberlandt 2026-01-06 12:47:56 -08:00 committed by GitHub
parent ccca3b8c67
commit 0aea22f13e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,7 @@
# Set attribute value if it is unset.
def set_default(attr, value):
if not getattr(config, attr, None):
if getattr(config, attr, "") == "":
setattr(config, attr, value)
# Generic config options for all compiler-rt lit tests.