mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This changes the Swift resource directory from looking like
lib/
swift/
macosx/
libswiftCore.dylib
libswiftDarwin.dylib
x86_64/
Swift.swiftmodule
Swift.swiftdoc
Darwin.swiftmodule
Darwin.swiftdoc
to
lib/
swift/
macosx/
libswiftCore.dylib
libswiftDarwin.dylib
Swift.swiftmodule/
x86_64.swiftmodule
x86_64.swiftdoc
Darwin.swiftmodule/
x86_64.swiftmodule
x86_64.swiftdoc
matching the layout we use for multi-architecture swiftmodules
everywhere else (particularly frameworks).
There's no change in this commit to how Linux swiftmodules are
packaged. There's been past interest in going the /opposite/ direction
for Linux, since there's not standard support for fat
(multi-architecture) .so libraries. Moving the .so search path /down/
to an architecture-specific directory on Linux would allow the same
resource directory to be used for both host-compiling and
cross-compiling.
rdar://problem/43545560
13 lines
573 B
Swift
13 lines
573 B
Swift
// REQUIRES: OS=macosx
|
|
|
|
var p: CoolInt
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %empty-directory(%t/custom-resource-dir/macosx/Swift.swiftmodule)
|
|
|
|
// RUN: %target-swift-frontend -emit-module -module-name Swift -parse-stdlib -target x86_64-apple-macosx10.12 %S/Inputs/custom-resource-stdlib.swift -o %t/custom-resource-dir/macosx/Swift.swiftmodule/%target-swiftmodule-name
|
|
// RUN: %sourcekitd-test -req=cursor -pos=3:8 %s -- -resource-dir %t/custom-resource-dir -target x86_64-apple-macosx10.12 %s | %FileCheck %s
|
|
|
|
// CHECK: source.lang.swift.ref.struct
|
|
// CHECK-NEXT: CoolInt
|