mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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
21 lines
1.0 KiB
Swift
21 lines
1.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift -emit-module -module-name Module %S/Inputs/loaded_module_trace_empty.swift -o %t/Module.swiftmodule
|
|
// RUN: %target-build-swift -emit-module -module-name Module2 %S/Inputs/loaded_module_trace_empty.swift -o %t/Module2.swiftmodule
|
|
// RUN: %target-build-swift %s %S/Inputs/loaded_module_trace_imports_module.swift -emit-loaded-module-trace-path %t/multifile.trace.json -emit-library -o %t/loaded_module_trace_multifile -I %t
|
|
// RUN: %FileCheck %s < %t/multifile.trace.json
|
|
|
|
// This file only imports Module2, but the other file imports Module: hopefully they both appear!
|
|
|
|
// CHECK: {
|
|
// CHECK: "name":"loaded_module_trace_multifile"
|
|
// CHECK: "arch":"{{[^"]*}}"
|
|
// CHECK: "swiftmodules":[
|
|
// CHECK-DAG: "{{[^"]*\\[/\\]}}Module2.swiftmodule"
|
|
// CHECK-DAG: "{{[^"]*\\[/\\]}}Module.swiftmodule"
|
|
// CHECK-DAG: "{{[^"]*\\[/\\]}}Swift.swiftmodule{{(\\[/\\][^"]+[.]swiftmodule)?}}"
|
|
// CHECK-DAG: "{{[^"]*\\[/\\]}}SwiftOnoneSupport.swiftmodule{{(\\[/\\][^"]+[.]swiftmodule)?}}"
|
|
// CHECK: ]
|
|
// CHECK: }
|
|
|
|
import Module2
|