mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
On creation, 'ClangImporter' adds overlay modulemap files for non-modular platform libraries (e.g. glibc, libstdc++), which allows Swift code to import and use those libraries. This change adds the same filesystem overlay to dependency scanning queries by applying them to the filesystem instantiated for each depndency scanning worker. Without these overlays EBM builds cannot discover and use non-modular system libraries on non-Darwin platforms. Resolves rdar://151780437
33 lines
1.1 KiB
Swift
33 lines
1.1 KiB
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -scan-dependencies -o %t/deps.json %s -cxx-interoperability-mode=default -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import
|
|
// RUN: %validate-json %t/deps.json | %FileCheck %s
|
|
|
|
import CxxStdlib
|
|
|
|
// CHECK: "mainModuleName": "deps"
|
|
|
|
/// --------Main module
|
|
// CHECK-LABEL: "modulePath": "deps.swiftmodule",
|
|
// CHECK-NEXT: "sourceFiles": [
|
|
// CHECK-NEXT: cxx-overlay-underlying-module-lookup.swift
|
|
// CHECK-NEXT: ],
|
|
|
|
// CHECK-NEXT: "directDependencies": [
|
|
// CHECK-DAG: "clang": "CxxShim"
|
|
// CHECK-DAG: "swift": "CxxStdlib"
|
|
// CHECK-DAG: "swift": "Cxx"
|
|
// CHECK-DAG: "swift": "Swift"
|
|
// CHECK-DAG: "swift": "SwiftOnoneSupport"
|
|
// CHECK: ],
|
|
|
|
/// ----------
|
|
// CHECK-LABEL: "modulePath": "{{.*}}{{/|\\}}CxxStdlib-{{.*}}.swiftmodule"
|
|
// CHECK-NEXT: "sourceFiles": []
|
|
// CHECK-NEXT: "directDependencies": [
|
|
// CHECK-DAG: "swift": "Cxx"
|
|
// CHECK-DAG: "swift": "Swift"
|
|
// CHECK-DAG: "clang": "std"
|
|
// CHECK-DAG: "clang": "CxxStdlibShim"
|
|
// CHECK: ],
|