MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / monolithicCompileArgs

Function monolithicCompileArgs

scripts/experimental/swiftui-preview.mjs:373–409  ·  view source on GitHub ↗
(
  context,
  stamp,
  sanitizedPath,
  wrapperPath,
  dylibPath,
  args,
  xcode,
  sourceFile,
)

Source from the content-addressed store, hash-verified

371}
372
373function monolithicCompileArgs(
374 context,
375 stamp,
376 sanitizedPath,
377 wrapperPath,
378 dylibPath,
379 args,
380 xcode,
381 sourceFile,
382) {
383 return [
384 "--sdk",
385 "iphonesimulator",
386 "swiftc",
387 "-target",
388 context.target,
389 "-sdk",
390 context.sdkPath,
391 "-parse-as-library",
392 "-Onone",
393 "-emit-library",
394 "-module-name",
395 `SimDeckPreviewPayload_${stamp.replaceAll("-", "_")}`,
396 "-framework",
397 "SwiftUI",
398 "-framework",
399 "UIKit",
400 ...xcodeSwiftcArgs(xcode),
401 sanitizedPath,
402 ...arrayArg(args.extraSwift).map((item) => path.resolve(item)),
403 wrapperPath,
404 ...xcodeObjectFiles(xcode, sourceFile),
405 ...arrayArg(args.swiftcArg),
406 "-o",
407 dylibPath,
408 ];
409}
410
411function splitWrapperCompileArgs(
412 context,

Callers 1

reloadPreviewFunction · 0.85

Calls 3

xcodeSwiftcArgsFunction · 0.85
arrayArgFunction · 0.85
xcodeObjectFilesFunction · 0.85

Tested by

no test coverage detected