Files
swift-mirror/test/ScanDependencies/include-target-sdk-in-interface-recipe.swift
artemcm 8dbbc807c8 [Dependency Scanning] Inherit target SDK name and version for textual interface build recipes
Otherwise they get built with an empty SDK name string and we do not get the benefit of the SDK name compatibility check in case they are loading modules from an incompatible SDK

Resolves rdar://135972810
2024-09-13 16:10:06 -07:00

13 lines
439 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -scan-dependencies -module-load-mode prefer-interface %s -o %t/deps.json -target-sdk-version 15.0 -target-sdk-name macosx15.0.test_name
// Check the contents of the JSON output
// RUN: %validate-json %t/deps.json | %FileCheck %s
func foo() { print(1) }
// CHECK: "-target-sdk-name",
// CHECK-NEXT: "macosx15.0.test_name"
// CHECK: "-target-sdk-version",
// CHECK-NEXT: "15.0"