X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fconfigure.py;h=31cc4aa57bbea45170f4ff339e424528c1edee5c;hb=fbfaeb67953b1ccaf09c5eacb8ff0dcc464c3274;hp=6b139decb555193f3990962a6812a217867c281c;hpb=ae8794ce6a7180aa81c718172321ac704e94f342;p=rust.git diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 6b139decb55..31cc4aa57bb 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -405,7 +405,9 @@ if 'target' in config: configured_targets.append(target) for target in configured_targets: targets[target] = sections['target'][:] - targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", "'{}'".format(target)) + # For `.` to be valid TOML, it needs to be quoted. But `bootstrap.py` doesn't use a proper TOML parser and fails to parse the target. + # Avoid using quotes unless it's necessary. + targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", "'{}'".format(target) if "." in target else target) def is_number(value):