diff --git a/.github/workflows/windows-builds-on-master.yaml b/.github/workflows/windows-builds-on-master.yaml index f7e19d719f..947671f315 100644 --- a/.github/workflows/windows-builds-on-master.yaml +++ b/.github/workflows/windows-builds-on-master.yaml @@ -21,6 +21,7 @@ jobs: matrix: target: - x86_64-pc-windows-msvc + - aarch64-pc-windows-msvc # skip-pr skip-stable - x86_64-pc-windows-gnu # skip-pr include: - target: x86_64-pc-windows-gnu @@ -29,6 +30,8 @@ jobs: - target: i686-pc-windows-gnu mingwdir: mingw32 mingw: https://ci-mirrors.rust-lang.org/rustc/i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z + - target: aarch64-pc-windows-msvc # skip-pr skip-stable + skip_tests: yes # skip-pr skip-stable steps: - uses: actions/checkout@v2 # v2 defaults to a shallow checkout, but we need at least to the previous tag @@ -62,7 +65,7 @@ jobs: run: | echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + echo "SKIP_TESTS=${{ matrix.skip_tests }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - name: Cache cargo registry and git trees uses: actions/cache@v2 with: diff --git a/.github/workflows/windows-builds-on-pr.yaml b/.github/workflows/windows-builds-on-pr.yaml index 1bf8c1d975..6a588716e3 100644 --- a/.github/workflows/windows-builds-on-pr.yaml +++ b/.github/workflows/windows-builds-on-pr.yaml @@ -59,7 +59,7 @@ jobs: run: | echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + echo "SKIP_TESTS=${{ matrix.skip_tests }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - name: Cache cargo registry and git trees uses: actions/cache@v2 with: diff --git a/.github/workflows/windows-builds-on-stable.yaml b/.github/workflows/windows-builds-on-stable.yaml index 84d39e2e4e..ea9a2ce49f 100644 --- a/.github/workflows/windows-builds-on-stable.yaml +++ b/.github/workflows/windows-builds-on-stable.yaml @@ -62,7 +62,7 @@ jobs: run: | echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + echo "SKIP_TESTS=${{ matrix.skip_tests }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - name: Cache cargo registry and git trees uses: actions/cache@v2 with: diff --git a/Cargo.lock b/Cargo.lock index b62eeef2ba..103bdda48d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -222,9 +222,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" dependencies = [ "jobserver", ] diff --git a/ci/actions-templates/README.md b/ci/actions-templates/README.md index a6dfed3c65..321de1ec29 100644 --- a/ci/actions-templates/README.md +++ b/ci/actions-templates/README.md @@ -67,6 +67,7 @@ system. | x86_64-pc-windows-gnu | No | One | No | Yes | | i686-pc-windows-msvc | No | One | No | No | | i686-pc-windows-gnu | No | One | No | No | +| aarch64-pc-windows-msvc | Yes | Two | No | Yes | We also have a clippy/shellcheck target which runs on x86_64 linux and is run in all cases. It does a `cargo fmt` check, a `cargo clippy` check on the diff --git a/ci/actions-templates/windows-builds-template.yaml b/ci/actions-templates/windows-builds-template.yaml index 7f444c541b..c7eea74d13 100644 --- a/ci/actions-templates/windows-builds-template.yaml +++ b/ci/actions-templates/windows-builds-template.yaml @@ -28,6 +28,7 @@ jobs: target: - x86_64-pc-windows-msvc - i686-pc-windows-msvc # skip-pr skip-master + - aarch64-pc-windows-msvc # skip-pr skip-stable - x86_64-pc-windows-gnu # skip-pr - i686-pc-windows-gnu # skip-pr skip-master include: @@ -37,6 +38,8 @@ jobs: - target: i686-pc-windows-gnu mingwdir: mingw32 mingw: https://ci-mirrors.rust-lang.org/rustc/i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z + - target: aarch64-pc-windows-msvc # skip-pr skip-stable + skip_tests: yes # skip-pr skip-stable steps: - uses: actions/checkout@v2 # v2 defaults to a shallow checkout, but we need at least to the previous tag @@ -70,7 +73,7 @@ jobs: run: | echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8 echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 + echo "SKIP_TESTS=${{ matrix.skip_tests }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8 - name: Cache cargo registry and git trees uses: actions/cache@v2 with: diff --git a/ci/run.bash b/ci/run.bash index a83d4bc7f6..89c301f1cc 100644 --- a/ci/run.bash +++ b/ci/run.bash @@ -20,6 +20,7 @@ case "$TARGET" in mips* ) ;; riscv* ) ;; s390x* ) ;; + aarch64-pc-windows-msvc ) ;; # default case, build with rustls enabled * ) FEATURES+=('--features' 'reqwest-rustls-tls') ;; esac diff --git a/doc/src/installation/windows.md b/doc/src/installation/windows.md index 53a2f9810a..a08c959f9b 100644 --- a/doc/src/installation/windows.md +++ b/doc/src/installation/windows.md @@ -16,7 +16,7 @@ tools" and "Windows 10 SDK" option. No additional software installation is necessary for basic use of the GNU build. By default `rustup` on Windows configures Rust to target the MSVC ABI, that is -a target triple of either `i686-pc-windows-msvc` or `x86_64-pc-windows-msvc` +a target triple of either `i686-pc-windows-msvc`, `x86_64-pc-windows-msvc`, or `aarch64-pc-windows-msvc` depending on the CPU architecture of the host Windows OS. The toolchains that `rustup` chooses to install, unless told otherwise through the [toolchain specification], will be compiled to run on that target triple host and will diff --git a/src/dist/dist.rs b/src/dist/dist.rs index 3de23f3572..90ca017cc8 100644 --- a/src/dist/dist.rs +++ b/src/dist/dist.rs @@ -234,6 +234,7 @@ impl TargetTriple { // First detect architecture const PROCESSOR_ARCHITECTURE_AMD64: u16 = 9; const PROCESSOR_ARCHITECTURE_INTEL: u16 = 0; + const PROCESSOR_ARCHITECTURE_ARM64: u16 = 12; let mut sys_info; unsafe { @@ -244,6 +245,7 @@ impl TargetTriple { let arch = match unsafe { sys_info.u.s() }.wProcessorArchitecture { PROCESSOR_ARCHITECTURE_AMD64 => "x86_64", PROCESSOR_ARCHITECTURE_INTEL => "i686", + PROCESSOR_ARCHITECTURE_ARM64 => "aarch64", _ => return None, };