peachsim 0.1.2682 → 0.1.2684
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/package.ts +277 -118
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +506 -599
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +15 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-V7B4X5PR.mjs → acorn-RMQKXS5S.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-UTI6VCYT.mjs → chunk-3DE27JA4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YKGS4NSG.mjs → chunk-42JSAQWG.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-5SWSDDXC.mjs → chunk-5KWWKCPH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-Z6R2HZIH.mjs → chunk-6BWHCTIS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-64UA6DQO.mjs → chunk-7IBMZCMJ.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-Y6WPXDCC.mjs → chunk-AF35PBIZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IOLISFIO.mjs → chunk-AYPGNUZY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3UQZATB5.mjs → chunk-DBGGJL5W.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-PE7HDZNI.mjs → chunk-DJQKYIHE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-6PSNFREM.mjs → chunk-DJSSFQTJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LV55WJFQ.mjs → chunk-HGTEJIU2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BJHQOPWO.mjs → chunk-HSNC4SEX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KYIRROKJ.mjs → chunk-I6KUV3AU.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VTJTOL53.mjs → chunk-M25SODH7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AXBK3CA4.mjs → chunk-MEV5LY7S.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-R2WPUKVT.mjs → chunk-ONY3LDGP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZYD227CX.mjs → chunk-PKGSIT4N.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-SZ5UPZE4.mjs → chunk-QA6WIBFG.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DU3VOY6S.mjs → chunk-QUNZ325E.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-3VAFU4BM.mjs → chunk-TN42RBSW.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-X37OP27I.mjs → chunk-TTUUDIZL.mjs} +678 -790
- package/dist-lib/esm-chunks/{chunk-EK36QRGX.mjs → chunk-V4RWDRKK.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-EC5RY4HR.mjs → chunk-XYDK4MKL.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-GNZDVDDX.mjs → chunk-YOVFAB5L.mjs} +6 -6
- package/dist-lib/esm-chunks/{metro-layout-parser-5RTSOQCS.mjs → metro-layout-parser-UX26SYJA.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-EH5JIX6L.mjs → swift-package-prebuilt-TFU7Q54I.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-VHAOCBXW.mjs → swift-sdk-app-module-PT7D7AOM.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-3NCWCGQZ.mjs → swift-sdk-image-HZG64EBF.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-5S4IKSJ2.mjs → swift-sdk-image-producer-MUVFVMXM.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +495 -593
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +620 -715
- package/dist-lib/host/fetch-proxy-handler.cjs +22 -24
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +87 -87
- package/dist-lib/public-origins-lib.json +76 -76
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +622 -717
- package/dist-lib/swift-compile.cjs +502 -618
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/image-fetch.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +1 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/src/bundle-channel.mjs +1 -1
- package/src/native-bundles.ts +7 -1
- package/src/native-package-slice.ts +28 -12
- package/src/nitro-bundle.ts +1 -0
- package/src/nitro-compile.ts +8 -2
- package/src/nitroContract.ts +35 -14
- package/src/one-sdk-bundle.ts +2 -2
- package/src/swift-compile.ts +25 -131
- package/src/swift-guest-compile.ts +184 -218
- package/src/swift-host.ts +13 -23
- package/src/swift-submit.ts +0 -2
- package/src/turbo-bundle.ts +2 -2
- package/src/turbo-compile.ts +0 -1
package/src/swift-compile.ts
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
reapRetiredCacheDirectory,
|
|
31
31
|
removeRetiredDirectory,
|
|
32
32
|
} from './retired-cache-directory'
|
|
33
|
-
import {
|
|
33
|
+
import { withSwiftCompileBudget } from './swift-compile-budget'
|
|
34
34
|
import { swiftCompilerSourceDigest } from './swift-compiler-digest'
|
|
35
35
|
import {
|
|
36
36
|
compileDarwinRecords,
|
|
@@ -126,7 +126,6 @@ import {
|
|
|
126
126
|
type SwiftRootLease,
|
|
127
127
|
type SwiftRootReadHold,
|
|
128
128
|
} from './swift-root-lock'
|
|
129
|
-
import { orderObjCConstructors } from './swift-sdk-image-wasm'
|
|
130
129
|
import {
|
|
131
130
|
cActiveCode,
|
|
132
131
|
clangInterfaceHeader,
|
|
@@ -170,7 +169,6 @@ import { swiftSharedSdkRoot } from './swift-shared-sdk'
|
|
|
170
169
|
import { collectSwiftSourceClosure } from './swift-source-closure'
|
|
171
170
|
import {
|
|
172
171
|
refreshSwiftCacheHold,
|
|
173
|
-
sourceSwiftCheckout,
|
|
174
172
|
SWIFT_AUTOLINK_LINKER,
|
|
175
173
|
SWIFT_CACHE_HOLD_MARKER,
|
|
176
174
|
swiftCacheDir,
|
|
@@ -206,7 +204,7 @@ import {
|
|
|
206
204
|
swiftFrameworkProductSchema,
|
|
207
205
|
} from './swiftRuntimeProductContract'
|
|
208
206
|
import { SWIFT_WASM_TRIPLE, wasmThreadLinkFlags } from './swiftTargetContract.ts'
|
|
209
|
-
import { KEEP_WASM_NAMES,
|
|
207
|
+
import { KEEP_WASM_NAMES, WASM_LOWER_IDENTITY } from './wasm-optimize'
|
|
210
208
|
import { writeBuildFile } from './write-build-file'
|
|
211
209
|
import { coalescibleHeaderOverlays, writeXcodeHeaderSearch } from './xcode-header-search'
|
|
212
210
|
import type { SwiftImageUpload } from './swift-submit'
|
|
@@ -507,8 +505,6 @@ export interface SwiftCompileOptions {
|
|
|
507
505
|
/** archive producers need the local object, interface and header products. */
|
|
508
506
|
intermediates?: boolean
|
|
509
507
|
objcPrebuiltStage?: SwiftObjCPrebuiltStage
|
|
510
|
-
/** link only the app's own code, as a module of the distribution's shared sdk image. */
|
|
511
|
-
sdkModule?: boolean
|
|
512
508
|
}
|
|
513
509
|
|
|
514
510
|
type SwiftProjectCompileOptions = SwiftCompileOptions &
|
|
@@ -5823,24 +5819,21 @@ function readCompiledArtifact(
|
|
|
5823
5819
|
bytes.readUInt32LE(4) !== 1
|
|
5824
5820
|
)
|
|
5825
5821
|
return null
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
sha256: image.sha256,
|
|
5842
|
-
binding: { bytes: binding, sha256: image.binding },
|
|
5843
|
-
}
|
|
5822
|
+
if (!('sdk' in receipt)) return null
|
|
5823
|
+
const image = receipt.sdk
|
|
5824
|
+
if (
|
|
5825
|
+
!isRecord(image) ||
|
|
5826
|
+
typeof image.key !== 'string' ||
|
|
5827
|
+
typeof image.sha256 !== 'string' ||
|
|
5828
|
+
typeof image.binding !== 'string'
|
|
5829
|
+
)
|
|
5830
|
+
return null
|
|
5831
|
+
const binding = readFileSync(path.join(directory, 'sdk-binding.bin'))
|
|
5832
|
+
if (createHash('sha256').update(binding).digest('hex') !== image.binding) return null
|
|
5833
|
+
const sdk: SwiftSdkModuleAsset = {
|
|
5834
|
+
key: image.key,
|
|
5835
|
+
sha256: image.sha256,
|
|
5836
|
+
binding: { bytes: binding, sha256: image.binding },
|
|
5844
5837
|
}
|
|
5845
5838
|
return { hash, bytes, icu: { sha256: receipt.icu, gzip }, sdk }
|
|
5846
5839
|
} catch (error) {
|
|
@@ -7085,10 +7078,10 @@ async function compileSwiftProjectOnce(
|
|
|
7085
7078
|
sources: path.join(root, 'Sources', 'App'),
|
|
7086
7079
|
multi: compileTargets(input).length > 0,
|
|
7087
7080
|
}
|
|
7088
|
-
const sdkModule = options.sdkModule && !options.linkOnly
|
|
7089
7081
|
// the shared sdk image builds once per distribution, outside this project's lock
|
|
7090
|
-
const sdkImage =
|
|
7091
|
-
?
|
|
7082
|
+
const sdkImage = options.linkOnly
|
|
7083
|
+
? undefined
|
|
7084
|
+
: await (
|
|
7092
7085
|
await import('./swift-sdk-image')
|
|
7093
7086
|
).buildSwiftSdkImage(
|
|
7094
7087
|
moduleRoot,
|
|
@@ -7096,11 +7089,9 @@ async function compileSwiftProjectOnce(
|
|
|
7096
7089
|
distribution ? [] : linkedFrameworkTargets(moduleRoot, input).imports,
|
|
7097
7090
|
{ signal: options.signal },
|
|
7098
7091
|
)
|
|
7099
|
-
: undefined
|
|
7100
7092
|
const inputHash = swiftCompileInputHash(input, options.release)
|
|
7101
7093
|
const moduleDigest = swiftModuleDigest(moduleRoot)
|
|
7102
7094
|
const sourceHash = inputHash.copy().update(moduleDigest).digest('hex')
|
|
7103
|
-
// an app module links against one sdk image; a whole image of the same sources differs
|
|
7104
7095
|
const hash = sdkImage
|
|
7105
7096
|
? createHash('sha256')
|
|
7106
7097
|
.update(`${sourceHash}\nsdk module ${sdkImage.key}`)
|
|
@@ -7136,90 +7127,6 @@ async function compileSwiftProjectOnce(
|
|
|
7136
7127
|
return retain(root, previous)
|
|
7137
7128
|
}
|
|
7138
7129
|
}
|
|
7139
|
-
// a live local or destination grant authorizes compilation here. a builder
|
|
7140
|
-
// returns only the artifact, so a caller that reads the local products builds here,
|
|
7141
|
-
// as does an app module, which links against this machine's sdk image.
|
|
7142
|
-
if (
|
|
7143
|
-
!options.intermediates &&
|
|
7144
|
-
!sdkImage &&
|
|
7145
|
-
process.platform === 'darwin' &&
|
|
7146
|
-
process.env.TM_SESSION &&
|
|
7147
|
-
!windowAdmission() &&
|
|
7148
|
-
process.env.CI !== 'true' &&
|
|
7149
|
-
moduleRoot === sourceSwiftCheckout() &&
|
|
7150
|
-
!swiftDistributionAt(moduleRoot)
|
|
7151
|
-
) {
|
|
7152
|
-
// staging another process's sources sweeps the root, so the request
|
|
7153
|
-
// and returning output live beside it until this caller cleans them.
|
|
7154
|
-
const requestRoot = mkdtempSync(`${root}.builder-request-`)
|
|
7155
|
-
const output = path.join(requestRoot, 'output')
|
|
7156
|
-
const request = path.join(requestRoot, 'request.json')
|
|
7157
|
-
writeFileSync(
|
|
7158
|
-
request,
|
|
7159
|
-
JSON.stringify({
|
|
7160
|
-
input,
|
|
7161
|
-
hash,
|
|
7162
|
-
release: options.release,
|
|
7163
|
-
timeoutMs: options.timeoutMs,
|
|
7164
|
-
// framework sources and compiler inputs own the shared object tree;
|
|
7165
|
-
// unrelated app edits reuse it without retaining stale private ABI.
|
|
7166
|
-
buildKey: frameworkKey,
|
|
7167
|
-
}),
|
|
7168
|
-
)
|
|
7169
|
-
try {
|
|
7170
|
-
const repo = path.resolve(moduleRoot, '../..')
|
|
7171
|
-
const timeout = swiftBuilderHopTimeoutMs(options.timeoutMs)
|
|
7172
|
-
report('requesting builder admission or cached result')
|
|
7173
|
-
await runCompiler(
|
|
7174
|
-
'bun',
|
|
7175
|
-
[
|
|
7176
|
-
path.join(repo, 'scripts/build/swift-project.ts'),
|
|
7177
|
-
'--request',
|
|
7178
|
-
request,
|
|
7179
|
-
'--output',
|
|
7180
|
-
output,
|
|
7181
|
-
],
|
|
7182
|
-
{
|
|
7183
|
-
cwd: repo,
|
|
7184
|
-
timeout,
|
|
7185
|
-
maxBuffer: 64 * 1024 * 1024,
|
|
7186
|
-
signal: options.signal,
|
|
7187
|
-
},
|
|
7188
|
-
true,
|
|
7189
|
-
).catch((error: unknown) => {
|
|
7190
|
-
if (options.signal?.aborted) throw error
|
|
7191
|
-
const output = outputOf(error)
|
|
7192
|
-
if (!(error instanceof Error) || Reflect.get(error, 'exitCode') !== 124)
|
|
7193
|
-
throw new Error(output, { cause: error })
|
|
7194
|
-
const prefix = `[swift-project ${hash.slice(0, 16)}] `
|
|
7195
|
-
const lines = output.split('\n')
|
|
7196
|
-
const stage = lines
|
|
7197
|
-
.findLast((line) => line.startsWith(prefix))
|
|
7198
|
-
?.slice(prefix.length)
|
|
7199
|
-
const cap = lines.find((line) =>
|
|
7200
|
-
line.startsWith('[remote] outer deadline leaves '),
|
|
7201
|
-
)
|
|
7202
|
-
const deadline = cap ? `\n${cap}` : ''
|
|
7203
|
-
throw new Error(
|
|
7204
|
-
`Swift builder deadline expired during ${stage ?? 'builder preparation'} ` +
|
|
7205
|
-
`(requested ${Math.ceil(timeout / 1000)}s for the builder hop).${deadline}`,
|
|
7206
|
-
{ cause: error },
|
|
7207
|
-
)
|
|
7208
|
-
})
|
|
7209
|
-
const artifact = readCompiledArtifact(output, hash)
|
|
7210
|
-
if (!artifact) {
|
|
7211
|
-
throw new Error(
|
|
7212
|
-
'swift-compile: builder artifact source, digest or wasm header is invalid',
|
|
7213
|
-
)
|
|
7214
|
-
}
|
|
7215
|
-
saveCompiledArtifact(root, artifact)
|
|
7216
|
-
saveSharedArtifact(sharedRoot, artifact)
|
|
7217
|
-
report('builder artifact verified')
|
|
7218
|
-
return retain(root, artifact)
|
|
7219
|
-
} finally {
|
|
7220
|
-
rmSync(requestRoot, { recursive: true, force: true })
|
|
7221
|
-
}
|
|
7222
|
-
}
|
|
7223
7130
|
// the root's sources, manifest and executable are shared by every process
|
|
7224
7131
|
// using it, so one process writes, builds and reads them at a time.
|
|
7225
7132
|
const baseRoot = root
|
|
@@ -7231,7 +7138,6 @@ async function compileSwiftProjectOnce(
|
|
|
7231
7138
|
const compatShapeParts = canPoolBuildRoot
|
|
7232
7139
|
? [
|
|
7233
7140
|
frameworkKey,
|
|
7234
|
-
Boolean(sdkImage),
|
|
7235
7141
|
compileTargets(input)
|
|
7236
7142
|
.map((target) => target.name)
|
|
7237
7143
|
.sort(),
|
|
@@ -8029,8 +7935,9 @@ async function compileSwiftProjectOnce(
|
|
|
8029
7935
|
? projectOutputFile(root, linked, options.project)
|
|
8030
7936
|
: linked
|
|
8031
7937
|
const optimized = `${output}.optimized`
|
|
8032
|
-
if (sdkImage
|
|
8033
|
-
|
|
7938
|
+
if (!sdkImage) throw new Error('swift-compile: missing shared SDK image')
|
|
7939
|
+
if (options.project) rmSync(optimized, { force: true })
|
|
7940
|
+
let sdkAsset: SwiftSdkModuleAsset
|
|
8034
7941
|
stage('linking the app image')
|
|
8035
7942
|
if (guestGraph) {
|
|
8036
7943
|
const binding = await compileGuestLink({
|
|
@@ -8060,9 +7967,8 @@ async function compileSwiftProjectOnce(
|
|
|
8060
7967
|
jobs: swiftBuildJobs(),
|
|
8061
7968
|
onStage: stage,
|
|
8062
7969
|
})
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
} else if (sdkImage) {
|
|
7970
|
+
sdkAsset = { key: sdkImage.key, sha256: sdkImage.sha256, binding }
|
|
7971
|
+
} else {
|
|
8066
7972
|
const { buildSwiftAppModule } = await import('./swift-sdk-app-module')
|
|
8067
7973
|
const binding = await buildSwiftAppModule({
|
|
8068
7974
|
buildRoot: root,
|
|
@@ -8080,19 +7986,7 @@ async function compileSwiftProjectOnce(
|
|
|
8080
7986
|
},
|
|
8081
7987
|
})
|
|
8082
7988
|
sdkAsset = { key: sdkImage.key, sha256: sdkImage.sha256, binding }
|
|
8083
|
-
} else {
|
|
8084
|
-
const bytes = readFileSync(output)
|
|
8085
|
-
const ordered = orderObjCConstructors(bytes)
|
|
8086
|
-
if (ordered !== bytes) writeFileSync(output, ordered)
|
|
8087
|
-
stage('lowering the app image')
|
|
8088
|
-
await lowerWasm(output, optimized, { optimize: input.optimize === true })
|
|
8089
7989
|
}
|
|
8090
|
-
if (!sdkImage)
|
|
8091
|
-
await runCompiler(
|
|
8092
|
-
path.join(options.toolchainBin, 'llvm-objcopy'),
|
|
8093
|
-
['--remove-section=.swift1_autolink_entries', optimized],
|
|
8094
|
-
buildOptions,
|
|
8095
|
-
)
|
|
8096
7990
|
const artifact = {
|
|
8097
7991
|
hash,
|
|
8098
7992
|
bytes: readFileSync(optimized),
|