1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Pin rust toolchain (#14817)

* Pin rust toolchain

* Always install targets in build script

* Delete installed toolchains
This commit is contained in:
Daniel García
2025-05-17 22:17:36 +02:00
committed by GitHub
parent 4079607a3e
commit a02c230e4d
5 changed files with 26 additions and 32 deletions

View File

@@ -45,6 +45,10 @@ function buildProxyBin(target, release = true) {
}
}
function installTarget(target) {
child_process.execSync(`rustup target add ${target}`, { stdio: 'inherit', cwd: __dirname });
}
if (!crossPlatform && !target) {
console.log(`Building native modules in ${mode} mode for the native architecture`);
buildNapiModule(false, mode === "release");
@@ -54,6 +58,7 @@ if (!crossPlatform && !target) {
if (target) {
console.log(`Building for target: ${target} in ${mode} mode`);
installTarget(target);
buildNapiModule(target, mode === "release");
buildProxyBin(target, mode === "release");
return;
@@ -70,6 +75,7 @@ if (process.platform === "linux") {
}
platformTargets.forEach(([target, _]) => {
installTarget(target);
buildNapiModule(target);
buildProxyBin(target);
});