mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This involved adding a new substitution called %api_diff_data_dir that when building against a host toolchain, looks in the host toolchain (next to swiftc) rather than in the resource dir. The reason why I need to do this is this allows me to perform a stdlib stage2 build without needing to build swift itself. The only interesting changes here are that I had to add %api_diff_data_dir to a bunch of normal/expected tests and also add %api_diff_data_dir's length to the offsets in rdar31892850.swift.
15 lines
841 B
Swift
15 lines
841 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: cp %s %t/input.swift
|
|
// 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
|
|
// RUN: ls %t/always_remove_old_remap_file.remap
|
|
|
|
// Simulate leaving behind code that can't build in Swift 4:
|
|
// RUN: echo asdfads >> %t/input.swift
|
|
|
|
// Migrate again. This should delete the old remap file.
|
|
// 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
|
|
|
|
// RUN: not ls %t/always_remove_old_remap_file.remap
|
|
|
|
func foo() {}
|