Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit f97c8f7

Browse files
fix: use ia64 only if runtime is 6.0.2 or later
Older runtimes cannot work with ia64 arch (they do not have the x86_64 arch), so check the runtime version and remove the ia64 (and all new archs that we may add in the future).
1 parent 65d5d3f commit f97c8f7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

snapshot/android/project-snapshot-generator.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,18 @@ ProjectSnapshotGenerator.prototype.generate = function (generationOptions) {
237237
throw new Error(noV8VersionFoundMessage);
238238
}
239239

240+
// NOTE: Order is important! Add new archs at the end of the array
241+
const defaultTargetArchs = ["arm", "arm64", "ia32", "ia64"];
242+
const runtimeVersion = getAndroidRuntimeVersion(this.options.projectRoot);
243+
if (runtimeVersion && semver.lt(semver.coerce(runtimeVersion), "6.0.2")) {
244+
const indexOfIa64 = defaultTargetArchs.indexOf("ia64");
245+
// Before 6.0.2 version of Android runtime we supported only arm, arm64 and ia32.
246+
defaultTargetArchs.splice(indexOfIa64, defaultTargetArchs.length - indexOfIa64);
247+
}
248+
240249
const options = {
241250
snapshotToolsPath,
242-
targetArchs: generationOptions.targetArchs || ["arm", "arm64", "ia32", "ia64"],
251+
targetArchs: generationOptions.targetArchs || defaultTargetArchs,
243252
v8Version: generationOptions.v8Version || v8Version,
244253
preprocessedInputFile: generationOptions.preprocessedInputFile,
245254
useLibs: generationOptions.useLibs || false,

0 commit comments

Comments
 (0)