Skip to content

Commit 85056ef

Browse files
committed
fix(onnxruntime): apply Eigen hash patch unconditionally
Move the Eigen hash patch outside the early return so it applies even when the ONNX Runtime source directory already exists. Previously, if the source was already cloned, the function would return early and skip the patch, causing build failures due to the hash mismatch.
1 parent ed95538 commit 85056ef

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

packages/onnxruntime/scripts/build.mjs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,17 @@ async function cloneOnnxSource() {
7070

7171
if (existsSync(ONNX_SOURCE_DIR)) {
7272
printStep('ONNX Runtime source already exists, skipping clone')
73-
await createCheckpoint('onnxruntime', 'cloned')
74-
return
75-
}
73+
} else {
74+
await fs.mkdir(BUILD_DIR, { recursive: true })
7675

77-
await fs.mkdir(BUILD_DIR, { recursive: true })
76+
printStep(`Cloning ONNX Runtime ${ONNX_VERSION}...`)
77+
await spawn('git', ['clone', '--depth', '1', '--branch', ONNX_VERSION, ONNX_REPO, ONNX_SOURCE_DIR], {
78+
shell: WIN32,
79+
stdio: 'inherit',
80+
})
7881

79-
printStep(`Cloning ONNX Runtime ${ONNX_VERSION}...`)
80-
await spawn('git', ['clone', '--depth', '1', '--branch', ONNX_VERSION, ONNX_REPO, ONNX_SOURCE_DIR], {
81-
shell: WIN32,
82-
stdio: 'inherit',
83-
})
84-
85-
printSuccess(`ONNX Runtime ${ONNX_VERSION} cloned`)
82+
printSuccess(`ONNX Runtime ${ONNX_VERSION} cloned`)
83+
}
8684

8785
// Patch eigen.cmake to accept the current Eigen hash from GitLab.
8886
// GitLab changed the archive format, causing hash mismatch.

0 commit comments

Comments
 (0)