mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When serializing the module interface path of an interface that is part of the SDK, we serialize relative to the SDK path. During deserialization we need to know if a path was serialized relative to the SDK or not. The existing logic assumes any relative path has been serialized relative to the SDK, which makes it impossible to compile modules from relative swiftinterface paths that are not part of the SDK. Update the swiftmodule file to include an attribute to show if the path was serialized relative to the SDK or not, which is used during deserialization to correctly reconstruct the interface path.
12 lines
581 B
Swift
12 lines
581 B
Swift
// RUN: %empty-directory(%t.relative_interface_path)
|
|
// RUN: cp -R %S/Inputs/relative_path %t.relative_interface_path/
|
|
// RUN: cd %t.relative_interface_path
|
|
// RUN: mkdir out
|
|
|
|
// RUN: %target-swift-frontend -target arm64-apple-macosx15.0 -compile-module-from-interface \
|
|
// RUN: relative_path/B.swiftmodule/arm64-apple-macos.swiftinterface -o out/B.swiftmodule
|
|
// RUN: %target-swift-frontend -target arm64-apple-macosx15.0 -compile-module-from-interface \
|
|
// RUN: relative_path/A.swiftmodule/arm64-apple-macos.swiftinterface -o out/A.swiftmodule -I out
|
|
|
|
// REQUIRES: OS=macosx
|