mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This lets users of `-explicit-swift-module-map-file` use a single mapping for all module dependencies, regardless of whether they're Swift or Clang modules, instead of manually splitting them among this file and command line flags.
38 lines
1.8 KiB
Swift
38 lines
1.8 KiB
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: mkdir -p %t/clang-module-cache
|
|
// RUN: mkdir -p %t/inputs
|
|
|
|
// RUN: echo "[{" > %/t/inputs/map.json
|
|
// RUN: echo "\"moduleName\": \"A\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
|
|
// RUN: echo "\"clangModuleMapPath\": \"%/S/Inputs/CHeaders/module.modulemap\"" >> %/t/inputs/map.json
|
|
// RUN: echo "}," >> %/t/inputs/map.json
|
|
// RUN: echo "{" >> %/t/inputs/map.json
|
|
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"modulePath\": \"%/stdlib_module\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
|
|
// RUN: echo "}," >> %/t/inputs/map.json
|
|
// RUN: echo "{" >> %/t/inputs/map.json
|
|
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
|
|
// RUN: echo "}," >> %/t/inputs/map.json
|
|
// RUN: echo "{" >> %/t/inputs/map.json
|
|
// RUN: echo "\"moduleName\": \"_Concurrency\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"modulePath\": \"%/concurrency_module\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
|
|
// RUN: echo "}," >> %/t/inputs/map.json
|
|
// RUN: echo "{" >> %/t/inputs/map.json
|
|
// RUN: echo "\"moduleName\": \"_StringProcessing\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"modulePath\": \"%/string_processing_module\"," >> %/t/inputs/map.json
|
|
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
|
|
// RUN: echo "}]" >> %/t/inputs/map.json
|
|
|
|
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/Foo.swiftmodule -module-cache-path %t.module-cache -explicit-swift-module-map-file %t/inputs/map.json %s
|
|
|
|
import A
|
|
|
|
func callA() {
|
|
funcA()
|
|
}
|