Skip to content

Commit 86c7245

Browse files
authored
Merge pull request swiftlang#38846 from gottesmm/pr-36215dc624bd0eff08ab502b119618f819699467
[swift-stage2] Point the API migrator at the correct directory when building/testing against a host toolchain.
2 parents 65244f0 + af25b67 commit 86c7245

23 files changed

+63
-43
lines changed

test/Migrator/always_remove_old_remap_file.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/input.swift
3-
// RUN: %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap -o /dev/null
3+
// RUN: %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap %api_diff_data_dir -o /dev/null %api_diff_data_dir
44
// RUN: ls %t/always_remove_old_remap_file.remap
55

66
// Simulate leaving behind code that can't build in Swift 4:
77
// RUN: echo asdfads >> %t/input.swift
88

99
// Migrate again. This should delete the old remap file.
10-
// RUN: not %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap -o /dev/null
10+
// RUN: not %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap %api_diff_data_dir -o /dev/null %api_diff_data_dir
1111

1212
// RUN: not ls %t/always_remove_old_remap_file.remap
1313

test/Migrator/fixit_flatMap.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
2-
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t.result -swift-version 4
1+
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 %api_diff_data_dir
2+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t.result -swift-version 4 %api_diff_data_dir
33
// RUN: diff -u %s.expected %t.result
44

55
// REQUIRES: VENDOR=apple

test/Migrator/fixit_flatMap.swift.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
2-
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t.result -swift-version 4
1+
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 %api_diff_data_dir
2+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t.result -swift-version 4 %api_diff_data_dir
33
// RUN: diff -u %s.expected %t.result
44

55
// REQUIRES: VENDOR=apple

test/Migrator/insert_replace_fixit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/result.swift -swift-version 4
2+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/result.swift -swift-version 4 %api_diff_data_dir
33
// RUN: %diff -u %s.expected %t/result.swift
44

55
import TestMyTime

test/Migrator/insert_replace_fixit.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/result.swift -swift-version 4
2+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/result.swift -swift-version 4 %api_diff_data_dir
33
// RUN: %diff -u %s.expected %t/result.swift
44

55
import TestMyTime

test/Migrator/no_ast_passes_after_swift4.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/no_ast_passes_after_swift4.swift.result -emit-remap-file-path %t/no_ast_passes_after_swift4.swift.remap -o /dev/null -swift-version 4.2
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/no_ast_passes_after_swift4.swift.result -emit-remap-file-path %t/no_ast_passes_after_swift4.swift.remap -o /dev/null -swift-version 4.2 %api_diff_data_dir
33
// RUN: diff -u %S/no_ast_passes_after_swift4.swift.expected %t/no_ast_passes_after_swift4.swift.result
4-
// RUN: %target-swift-frontend -typecheck -F %S/mock-sdk -swift-version 4 %t/no_ast_passes_after_swift4.swift.result
4+
// RUN: %target-swift-frontend -typecheck -F %S/mock-sdk -swift-version 4 %t/no_ast_passes_after_swift4.swift.result %api_diff_data_dir
55

66
import Bar
77
func foo() -> FooComparisonResult {

test/Migrator/no_ast_passes_after_swift4.swift.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/no_ast_passes_after_swift4.swift.result -emit-remap-file-path %t/no_ast_passes_after_swift4.swift.remap -o /dev/null -swift-version 4.2
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/no_ast_passes_after_swift4.swift.result -emit-remap-file-path %t/no_ast_passes_after_swift4.swift.remap -o /dev/null -swift-version 4.2 %api_diff_data_dir
33
// RUN: diff -u %S/no_ast_passes_after_swift4.swift.expected %t/no_ast_passes_after_swift4.swift.result
4-
// RUN: %target-swift-frontend -typecheck -F %S/mock-sdk -swift-version 4 %t/no_ast_passes_after_swift4.swift.result
4+
// RUN: %target-swift-frontend -typecheck -F %S/mock-sdk -swift-version 4 %t/no_ast_passes_after_swift4.swift.result %api_diff_data_dir
55

66
import Bar
77
func foo() -> FooComparisonResult {

test/Migrator/no_extraneous_argument_labels.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 4 -o /dev/null
1+
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 %api_diff_data_dir
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 4 -o /dev/null %api_diff_data_dir
33
// RUN: %diff -u %s.expected %t/no_extraneous_argument_labels.result
4-
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5
4+
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5 %api_diff_data_dir
55

66
func foo(_ oc: [String]) {
77
var args: [String] = []

test/Migrator/no_extraneous_argument_labels.swift.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 4 -o /dev/null
1+
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 %api_diff_data_dir
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -primary-file %s -emit-migrated-file-path %t/no_extraneous_argument_labels.result -swift-version 4 -o /dev/null %api_diff_data_dir
33
// RUN: %diff -u %s.expected %t/no_extraneous_argument_labels.result
4-
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5
4+
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 5 %api_diff_data_dir
55

66
func foo(_ oc: [String]) {
77
var args: [String] = []

test/Migrator/no_var_to_let.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %target-swift-frontend -typecheck %s -swift-version 4
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null
3-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null
1+
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 %api_diff_data_dir
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null %api_diff_data_dir
3+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null %api_diff_data_dir
44
// RUN: %diff -u %s %t/no_var_to_let.swift.result
5-
// RUN: %target-swift-frontend -typecheck %s -swift-version 5
5+
// RUN: %target-swift-frontend -typecheck %s -swift-version 5 %api_diff_data_dir
66

77
// Note that the diff run line indicates that there should be no change.
88

test/Migrator/null_migration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/migrated_null_migration.swift -emit-remap-file-path %t/null_migration.remap -o /dev/null
1+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/migrated_null_migration.swift -emit-remap-file-path %t/null_migration.remap -o /dev/null %api_diff_data_dir
22
// RUN: %diff -u %s %t/migrated_null_migration.swift
33

44
// This file tests that, if all migration passes are no-op,

test/Migrator/optional_try_migration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -c -swift-version 4 -primary-file %s -emit-migrated-file-path %t/optional_try_migration.result.swift
2+
// RUN: %target-swift-frontend -c -swift-version 4 -primary-file %s -emit-migrated-file-path %t/optional_try_migration.result.swift %api_diff_data_dir
33
// RUN: %diff -u %S/optional_try_migration.swift.expected %t/optional_try_migration.result.swift
44

55
func fetchOptInt() throws -> Int? {

test/Migrator/optional_try_migration.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -c -swift-version 4 -primary-file %s -emit-migrated-file-path %t/optional_try_migration.result.swift
2+
// RUN: %target-swift-frontend -c -swift-version 4 -primary-file %s -emit-migrated-file-path %t/optional_try_migration.result.swift %api_diff_data_dir
33
// RUN: %diff -u %S/optional_try_migration.swift.expected %t/optional_try_migration.result.swift
44

55
func fetchOptInt() throws -> Int? {

test/Migrator/post_fixit_pass.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/post_fixit_pass.swift.result -o /dev/null -F %S/mock-sdk -swift-version 4
1+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/post_fixit_pass.swift.result -o /dev/null -F %S/mock-sdk -swift-version 4 %api_diff_data_dir
22
// RUN: %diff -u %S/post_fixit_pass.swift.expected %t/post_fixit_pass.swift.result
33

44
#if swift(>=4.2)

test/Migrator/post_fixit_pass.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/post_fixit_pass.swift.result -o /dev/null -F %S/mock-sdk -swift-version 4
1+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/post_fixit_pass.swift.result -o /dev/null -F %S/mock-sdk -swift-version 4 %api_diff_data_dir
22
// RUN: %diff -u %S/post_fixit_pass.swift.expected %t/post_fixit_pass.swift.result
33

44
#if swift(>=4.2)

test/Migrator/rdar31892850.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend -typecheck -primary-file %s -module-cache-path %t/mcp -emit-remap-file-path %t/edits.remap -swift-version 4
2+
// RUN: %target-swift-frontend -typecheck -primary-file %s -module-cache-path %t/mcp -emit-remap-file-path %t/edits.remap -swift-version 4 %api_diff_data_dir
33
// RUN: %FileCheck %s -input-file=%t/edits.remap
44

55
enum SomeStringEnum : String {
@@ -15,12 +15,12 @@ func foo() {
1515
// CHECK:[
1616
// CHECK: {
1717
// CHECK: "file": "{{.*}}rdar31892850.swift",
18-
// CHECK: "offset": 325,
19-
// CHECK: "text": "SomeStringEnum(rawValue: "
18+
// CHECK-NEXT: "offset": 344,
19+
// CHECK-NEXT: "text": "SomeStringEnum(rawValue: "
2020
// CHECK: },
2121
// CHECK: {
2222
// CHECK: "file": "{{.*}}rdar31892850.swift",
23-
// CHECK: "offset": 329,
24-
// CHECK: "text": ") ?? <#default value#>"
23+
// CHECK-NEXT: "offset": 348,
24+
// CHECK-NEXT: "text": ") ?? <#default value#>"
2525
// CHECK: }
2626
// CHECK:]

test/Migrator/remove_override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: OS=macosx
22
// RUN: %empty-directory(%t)
3-
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap
3+
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir
44
// RUN: diff -u %S/remove_override.swift.expected %t/remove_override.result.swift
55

66
import AppKit

test/Migrator/remove_override.swift.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: OS=macosx
22
// RUN: %empty-directory(%t)
3-
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap
3+
// RUN: %target-swift-frontend -c -update-code -swift-version 4 -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/remove_override.result.swift -o %t/rename-func-decl.swift.remap %api_diff_data_dir
44
// RUN: diff -u %S/remove_override.swift.expected %t/remove_override.result.swift
55

66
import AppKit

test/Migrator/stdlib_rename.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null %api_diff_data_dir
33
// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
4-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2
4+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2 %api_diff_data_dir
55
// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
66

77
func test1(_ a: [String], s: String) {
@@ -10,4 +10,4 @@ func test1(_ a: [String], s: String) {
1010
}
1111
func test2(_ s: String, c: Character) {
1212
_ = s.index(of: c)
13-
}
13+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null %api_diff_data_dir
33
// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
4-
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2
4+
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2 %api_diff_data_dir
55
// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
66

77
func test1(_ a: [String], s: String) {
@@ -10,4 +10,4 @@ func test1(_ a: [String], s: String) {
1010
}
1111
func test2(_ s: String, c: Character) {
1212
_ = s.firstIndex(of: c)
13-
}
13+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: OS=macosx
2-
// RUN: %empty-directory(%t) && %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummpy.result -swift-version 4
3-
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummpy.result -swift-version 5
2+
// RUN: %empty-directory(%t) && %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummpy.result -swift-version 4 %api_diff_data_dir
3+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/dummpy.result -swift-version 5 %api_diff_data_dir
44

5-
func foo() {}
5+
func foo() {}

test/lit.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,6 +2205,20 @@ config.environment['SWIFT_DEBUG_ENABLE_COW_CHECKS'] = 'false'
22052205
# Add this to the command which runs an executable to enable COW checks in the swift runtime.
22062206
config.substitutions.append(('%enable-cow-checking', TARGET_ENV_PREFIX + 'SWIFT_DEBUG_ENABLE_COW_CHECKS=true;'))
22072207

2208+
# We add an expansion to ensure that migrator tests can search for the api diff
2209+
# data dir from the host compiler toolchain instead of the resource dir of the
2210+
# stdlib. Since we are using the host compiler, we would not have built any
2211+
# tools meaning that we would not have generated the -api-diff-data-dir.
2212+
#
2213+
# In the case where we are not building against the host compiler, this just
2214+
# expands to the empty string.
2215+
api_diff_data_dir_flag = ''
2216+
if hasattr(config, 'testing_against_host_compiler'):
2217+
migrator_dir = os.path.join(os.path.dirname(config.swiftc),
2218+
os.pardir, 'lib', 'swift', 'migrator')
2219+
api_diff_data_dir_flag = ' -api-diff-data-dir {} '.format(migrator_dir)
2220+
config.substitutions.append(('%api_diff_data_dir', api_diff_data_dir_flag))
2221+
22082222
if config.lldb_build_root != "":
22092223
lldb_python_path = get_lldb_python_path(config.lldb_build_root)
22102224
lldb_python_interpreter = get_lldb_python_interpreter(config.lldb_build_root)

test/lit.site.cfg.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ config.darwin_enable_maccatalyst = "@SWIFT_ENABLE_MACCATALYST@" == "TRUE"
6060
config.darwin_maccatalyst_build_flavor = "@BUILD_FLAVOR@"
6161
config.darwin_osx_variant_suffix = "@DEFAULT_OSX_VARIANT_SUFFIX@"
6262

63+
# If we are not testing against the host compiler, we are testing against the
64+
# just built compiler. Add that as a feature so we can conditionally mark tests
65+
# as requiring a just_built_compiler.
66+
config.testing_against_host_compiler = \
67+
"@SWIFT_RUN_TESTS_WITH_HOST_COMPILER@" == "TRUE"
68+
6369
# Please remember to handle empty strings and/or unset variables correctly.
6470

6571
if "@SWIFT_ASAN_BUILD@" == "TRUE":

0 commit comments

Comments
 (0)