Files
swift-mirror/test/ScanDependencies/module_deps_link_libs.swift
Saleem Abdulrasool 9c85fbc8da AST,DependencyScan,IRGen,Serialization,Tooling: track library style (#78777)
Track if the dependency is static or dynamic. This is in preparation for
helping rename the static library to differentiate it from import
libraries.
2025-02-06 13:22:56 -08:00

29 lines
926 B
Swift

// RUN: %empty-directory(%t)
// REQUIRES: objc_interop
// RUN: %target-swift-frontend -scan-dependencies -module-cache-path %t/clang-module-cache %s -o %t/deps.json -I %S/Inputs/CHeaders -I %S/Inputs/Swift
// Check the contents of the JSON output
// RUN: %validate-json %t/deps.json | %FileCheck %s
import C
import E
import G
import SubE
// CHECK: "mainModuleName": "deps"
// CHECK: "linkName": "objc",
// CHECK-NEXT: "isStatic": false,
// CHECK-NEXT: "isFramework": false,
// CHECK-NEXT: "shouldForceLoad": false
// CHECK: "linkName": "nonSwiftyLibC",
// CHECK-NEXT: "isStatic": false,
// CHECK-NEXT: "isFramework": true,
// CHECK-NEXT: "shouldForceLoad": false
// CHECK: "linkName": "swiftyLibE",
// CHECK-NEXT: "isStatic": false,
// CHECK-NEXT: "isFramework": false,
// CHECK-NEXT: "shouldForceLoad": true