rustup: Explicitly set toolchain host (#3269)

* the host should be set to gnu

compared to rustup-msvc, we should ensure the host to be `gnu` with this.

* fix for 32bit user

fix for 32bit user

* Update rustup.json

* clear pre-install

move into install

* also set for rustup-msvc

* Update rustup.json

* Apply suggestions from code review

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
This commit is contained in:
Tao_eternal 2022-02-02 22:09:25 +08:00 committed by GitHub
parent 351b94cc81
commit 87a8ef2b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,8 @@
"script": [
"[Environment]::SetEnvironmentVariable('CARGO_HOME', \"$persist_dir\\.cargo\", 'Process')",
"[Environment]::SetEnvironmentVariable('RUSTUP_HOME', \"$persist_dir\\.rustup\", 'Process')",
"Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args '-y --no-modify-path' | Out-Null"
"$host_arch = if ($architecture -eq '64bit') {'x86_64'} else {'i686'}",
"Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args \"-y --no-modify-path --default-host $host_arch-pc-windows-msvc\" | Out-Null"
]
},
"env_add_path": ".cargo\\bin",

View File

@ -18,7 +18,8 @@
"script": [
"[Environment]::SetEnvironmentVariable('CARGO_HOME', \"$persist_dir\\.cargo\", 'Process')",
"[Environment]::SetEnvironmentVariable('RUSTUP_HOME', \"$persist_dir\\.rustup\", 'Process')",
"Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args '-y --no-modify-path' | Out-Null"
"$host_arch = if ($architecture -eq '64bit') {'x86_64'} else {'i686'}",
"Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args \"-y --no-modify-path --default-host $host_arch-pc-windows-gnu\" | Out-Null"
]
},
"env_add_path": ".cargo\\bin",