Skip to content

Commit 4fb4d4e

Browse files
committed
fix: data 엔진 host bootstrap을 분리한다
target module source만 먼저 준비하고 SIMD Setup은 WASI build에만 적용한다. host GCC가 target 전용 flag를 받지 않도록 재현 builder 구조 계약을 추가한다. 검증: npm run test:contracts, npm test
1 parent c98d9e4 commit 4fb4d4e

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ No unreleased public changes.
5151
isolated process group that is terminated as a whole. A remaining exact profile becomes a structured failure.
5252
- Digest-locked Python wrapper sources are checked out as LF on every platform, so fresh Windows runners verify
5353
the same supply-chain bytes as Linux and repository builds.
54+
- The data engine builder copies target module sources before the native bootstrap but applies its SIMD
55+
`Setup.local` only to the WASI target build, keeping host GCC free of target-only flags.
5456
- V86 inspection reports readiness only after the engine event. A pre-ready timeout no longer calls unsafe
5557
partial-instance stop or destroy methods, while a ready instance retains the full drain, flush, and destroy
5658
path.

scripts/engineBuilder/buildOwnedEngine.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ async function download(url, path, sha256) {
5151
await verify(path, sha256);
5252
}
5353

54-
async function prepareSetup(sourceDir, buildDir, profileInput) {
54+
async function prepareModuleSources(sourceDir, profileInput) {
5555
for (const module of profileInput.recipe.modules) {
5656
await copyFile(join(SCRIPT_DIR, module.source), join(sourceDir, "Modules", module.source));
5757
}
58+
}
59+
60+
async function prepareSetup(sourceDir, buildDir, profileInput) {
61+
await prepareModuleSources(sourceDir, profileInput);
5862
await mkdir(join(buildDir, "Modules"), { recursive: true });
5963
await copyFile(join(SCRIPT_DIR, profileInput.recipe.setupFile), join(buildDir, "Modules", "Setup.local"));
6064
}
@@ -100,7 +104,8 @@ async function main() {
100104
};
101105
const buildTriple = run(join(sourceDir, "config.guess"), [], { cwd: sourceDir, env: baseEnv, capture: true });
102106
const nativeBuildDir = join(sourceDir, "cross-build", buildTriple);
103-
await prepareSetup(sourceDir, nativeBuildDir, profileBuild.input);
107+
await prepareModuleSources(sourceDir, profileBuild.input);
108+
await mkdir(nativeBuildDir, { recursive: true });
104109
run("../../configure", lock.configureArgs, {
105110
cwd: nativeBuildDir,
106111
env: { ...baseEnv, CFLAGS: lock.cflags },

tests/contracts/engineBuilder.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ export async function assertOwnedEngineBuilder() {
218218
&& windowsBuilder.includes("generateWindowsCrossSysconfigData")
219219
&& windowsBuilder.includes("ownedBuildDetailsArguments"),
220220
"Windows owned engine build does not generate platform metadata");
221-
assert(linuxBuilder.includes("ownedBuildDetailsArguments"),
222-
"Linux owned engine build does not generate platform metadata");
221+
assert(linuxBuilder.includes("ownedBuildDetailsArguments")
222+
&& linuxBuilder.includes("prepareModuleSources(sourceDir, profileBuild.input)")
223+
&& !linuxBuilder.includes("prepareSetup(sourceDir, nativeBuildDir"),
224+
"Linux owned engine host bootstrap incorrectly applies target-only native modules");
223225
}

0 commit comments

Comments
 (0)