Files
swift-mirror/test/ModuleInterface/obfuscator.swift
Xi Ge 53d46841d4 ModuleInterface: pass-down paths obfuscator to module interface building commands
While implicitly building .swiftinterface, the interface may import other binary modules.
These binary modules may contain serialized search paths that have been obfuscated. To help
interface building commands recover these search paths, we need to pass down the obfuscators
to the module building commands.

rdar://87840268
2022-01-20 14:48:55 -08:00

34 lines
764 B
Swift

// REQUIRES: VENDOR=apple
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/module-cache)
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/Foo.swiftmodule -module-name Foo -enable-library-evolution %s -DFoo -I %S/Inputs/imports-clang-modules/ -serialized-path-obfuscate %S=%S_obfuscated
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t/Bar.swiftinterface -module-name Bar -enable-library-evolution %s -DBar -I %t -serialized-path-obfuscate %S=%S_obfuscated
// RUN: %target-swift-frontend -typecheck %s -I %t -serialized-path-obfuscate %S=%S_obfuscated -DFooBar
#if Foo
import A
public func fooFunc() {}
#endif
#if Bar
import Foo
func barFunc() {
fooFunc()
}
#endif
#if FooBar
import Bar
import A
#endif