|
44 | 44 | "SWIFT_FEATURE_DEBUG_PREFIX_MAP",
|
45 | 45 | "SWIFT_FEATURE_ENABLE_BATCH_MODE",
|
46 | 46 | "SWIFT_FEATURE_MODULE_MAP_HOME_IS_CWD",
|
| 47 | + "SWIFT_FEATURE_USE_OLD_DRIVER", |
47 | 48 | "SWIFT_FEATURE_USE_RESPONSE_FILES",
|
48 | 49 | )
|
49 | 50 | load(
|
@@ -577,10 +578,13 @@ def _all_tool_configs(
|
577 | 578 | if custom_toolchain:
|
578 | 579 | env["TOOLCHAINS"] = custom_toolchain
|
579 | 580 |
|
580 |
| - # Starting with Xcode 13.3 (Swift 5.6), the legacy driver prints a warning |
581 |
| - # if it is used. Suppress it, since we still have to use it due to response |
582 |
| - # file bugs. |
583 |
| - if _is_xcode_at_least_version(xcode_config, "13.3"): |
| 581 | + # In Xcode 13.3 and 13.4 (Swift 5.6), the legacy driver prints a warning |
| 582 | + # if it is used. Suppress it, since we still have to use it on those |
| 583 | + # specific versions due to response file bugs. |
| 584 | + if ( |
| 585 | + _is_xcode_at_least_version(xcode_config, "13.3") and |
| 586 | + not _is_xcode_at_least_version(xcode_config, "14.0") |
| 587 | + ): |
584 | 588 | env["SWIFT_AVOID_WARNING_USING_OLD_DRIVER"] = "1"
|
585 | 589 |
|
586 | 590 | def _driver_config(*, mode):
|
@@ -730,6 +734,11 @@ def _xcode_swift_toolchain_impl(ctx):
|
730 | 734 | SWIFT_FEATURE_DEBUG_PREFIX_MAP,
|
731 | 735 | ])
|
732 | 736 |
|
| 737 | + # The new driver had response file bugs in Xcode 13.x that are fixed in |
| 738 | + # Xcode 14. |
| 739 | + if not _is_xcode_at_least_version(xcode_config, "14.0"): |
| 740 | + requested_features.append(SWIFT_FEATURE_USE_OLD_DRIVER) |
| 741 | + |
733 | 742 | env = _xcode_env(target_triple = target_triple, xcode_config = xcode_config)
|
734 | 743 | execution_requirements = xcode_config.execution_info()
|
735 | 744 | generated_header_rewriter = resolve_optional_tool(
|
|
0 commit comments