Files
swift-mirror/test/Serialization/search-paths-sdk-auxiliary.swift
Artem Chikin faf0b21339 Add additional implicit framework search path for Darwin platforms
'/System/Library/SubFrameworks' will be searched for frameworks by the compiler implicitly when an SDK path is specified.

Resolves rdar://137454957
2024-12-05 13:56:52 -08:00

22 lines
1.0 KiB
Swift

// REQUIRES: VENDOR=apple
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/System/Library/Frameworks/TestFramework.framework/Modules/TestFramework.swiftmodule)
// RUN: %empty-directory(%t/System/Library/SubRFrameworksLibrary/Frameworks/TestFramework2.framework/Modules/TestFramework2.swiftmodule)
// RUN: %target-build-swift -emit-module -o %t/System/Library/Frameworks/TestFramework.framework/Modules/TestFramework.swiftmodule/%target-swiftmodule-name -module-name TestFramework %s -DFRAMEWORK
// RUN: %target-build-swift -emit-module -o %t/System/Library/SubFrameworks/TestFramework2.framework/Modules/TestFramework2.swiftmodule/%target-swiftmodule-name -module-name TestFramework2 %s -DFRAMEWORK
// RUN: %target-swift-frontend -typecheck -sdk %t %s -diagnostic-style llvm -Rmodule-loading 2>&1 | %FileCheck %s
#if FRAMEWORK
public func foo() {}
#else
import TestFramework
import TestFramework2
#endif // FRAMEWORK
// CHECK: remark: loaded module 'TestFramework'
// CHECK: remark: loaded module 'TestFramework2'