( context, stamp, wrapperPath, dylibPath, sourceModule, args, xcode, sourceFile, )
| 409 | } |
| 410 | |
| 411 | function splitWrapperCompileArgs( |
| 412 | context, |
| 413 | stamp, |
| 414 | wrapperPath, |
| 415 | dylibPath, |
| 416 | sourceModule, |
| 417 | args, |
| 418 | xcode, |
| 419 | sourceFile, |
| 420 | ) { |
| 421 | return [ |
| 422 | "--sdk", |
| 423 | "iphonesimulator", |
| 424 | "swiftc", |
| 425 | "-target", |
| 426 | context.target, |
| 427 | "-sdk", |
| 428 | context.sdkPath, |
| 429 | "-parse-as-library", |
| 430 | "-Onone", |
| 431 | "-emit-library", |
| 432 | "-module-name", |
| 433 | `SimDeckPreviewPayload_${stamp.replaceAll("-", "_")}`, |
| 434 | "-I", |
| 435 | sourceModule.directory, |
| 436 | "-framework", |
| 437 | "SwiftUI", |
| 438 | "-framework", |
| 439 | "UIKit", |
| 440 | ...xcodeSwiftcArgs(xcode), |
| 441 | wrapperPath, |
| 442 | sourceModule.objectPath, |
| 443 | ...xcodeObjectFiles(xcode, sourceFile), |
| 444 | ...arrayArg(args.swiftcArg), |
| 445 | "-o", |
| 446 | dylibPath, |
| 447 | ]; |
| 448 | } |
| 449 | |
| 450 | function previewSourceModule(context, sanitizedSource, args, xcode) { |
| 451 | const extraSwift = arrayArg(args.extraSwift); |
no test coverage detected