Skip to content

Commit

Permalink
feat(cli): Add support for s390x linux arch in js bindings template (#…
Browse files Browse the repository at this point in the history
…1901)

Signed-off-by: Milton Moura <miltonmoura@gmail.com>
  • Loading branch information
mgcm committed Jan 16, 2024
1 parent 78de67e commit ddeaf30
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cli/src/api/templates/js-binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,20 @@ switch (platform) {
}
}
break
case 's390x':
localFileExisted = existsSync(
join(__dirname, '${localName}.linux-s390x-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./${localName}.linux-s390x-gnu.node')
} else {
nativeBinding = require('${pkgName}-linux-s390x-gnu')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(\`Unsupported architecture on Linux: \${arch}\`)
}
Expand Down

0 comments on commit ddeaf30

Please sign in to comment.