diff --git a/.github/toolchain-mingw-armv7.cmake b/.github/toolchain-mingw-armv7.cmake new file mode 100644 index 0000000000..3ef860aae7 --- /dev/null +++ b/.github/toolchain-mingw-armv7.cmake @@ -0,0 +1,33 @@ +# Copyright (C) 2020 Matthew Glazar +# See end of file for extended copyright information. + +# This is a CMake toolchain file used on CI to cross-compile to Linux AArch64. + +set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_SYSTEM_PROCESSOR arm) + +set(CMAKE_C_COMPILER armv7-w64-mingw32-cc) +set(CMAKE_CXX_COMPILER armv7-w64-mingw32-c++) +set(CMAKE_RC_COMPILER armv7-w64-mingw32-windres) + +set(CMAKE_SYSTEM_INCLUDE_PATH /opt/llvm-mingw/armv7-w64-mingw32/include) +set(CMAKE_SYSTEM_LIBRARY_PATH /opt/llvm-mingw/armv7-w64-mingw32/lib) +set(CMAKE_SYSTEM_PREFIX_PATH /opt/llvm-mingw/armv7-w64-mingw32) + +# quick-lint-js finds bugs in JavaScript programs. +# Copyright (C) 2020 Matthew Glazar +# +# This file is part of quick-lint-js. +# +# quick-lint-js is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# quick-lint-js is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with quick-lint-js. If not, see . diff --git a/.github/workflows/build-and-test-plugin-vscode.yml b/.github/workflows/build-and-test-plugin-vscode.yml index 0345c01443..d8a3a81f99 100644 --- a/.github/workflows/build-and-test-plugin-vscode.yml +++ b/.github/workflows/build-and-test-plugin-vscode.yml @@ -22,9 +22,8 @@ jobs: - {runs_on: ubuntu-latest, name: "Linux AArch64", platform_arch: "linux-arm64", test: false, docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v1", CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-aarch64.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"} - {runs_on: windows-2022, name: "Windows x86", platform_arch: "win32-ia32", test: true, CC: "c:/msys64/mingw32/bin/gcc.exe", CXX: "c:/msys64/mingw32/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-i686-gcc ninja", LDFLAGS: "-static"} - {runs_on: windows-2022, name: "Windows x64", platform_arch: "win32-x64", test: true, CC: "c:/msys64/ucrt64/bin/gcc.exe", CXX: "c:/msys64/ucrt64/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-ucrt-x86_64-gcc ninja", LDFLAGS: "-static"} + - {runs_on: ubuntu-latest, name: "Windows ARM", platform_arch: "win32-arm", test: false, docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v1", CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-armv7.cmake -G Ninja", LDFLAGS: "-static"} - {runs_on: ubuntu-latest, name: "Windows ARM64", platform_arch: "win32-arm64", test: false, docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v1", CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-aarch64.cmake -G Ninja", LDFLAGS: "-static"} - # TODO(strager): Switch to MinGW for these builds. https://github.com/quick-lint/quick-lint-js/issues/678 - - {runs_on: windows-latest, name: "Windows ARM", platform_arch: "win32-arm", test: false, CMAKE_FLAGS: "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -A ARM"} runs-on: ${{ matrix.os.runs_on }} container: ${{ matrix.os.docker_container }} env: diff --git a/.github/workflows/build-static.yml b/.github/workflows/build-static.yml index 59b07272cd..39bef27a58 100644 --- a/.github/workflows/build-static.yml +++ b/.github/workflows/build-static.yml @@ -21,9 +21,8 @@ jobs: - {runs_on: ubuntu-latest, name: "Linux AArch64", archive_name: "linux-aarch64", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v1", test: false, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-aarch64.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"} - {runs_on: windows-2022, name: "Windows x86", archive_name: "windows-x86", archive_extension: ".zip", test: true, CC: "c:/msys64/mingw32/bin/gcc.exe", CXX: "c:/msys64/mingw32/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-i686-gcc ninja", LDFLAGS: "-static"} - {runs_on: windows-2022, name: "Windows x64", archive_name: "windows", archive_extension: ".zip", test: true, CC: "c:/msys64/ucrt64/bin/gcc.exe", CXX: "c:/msys64/ucrt64/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-ucrt-x86_64-gcc ninja", LDFLAGS: "-static"} + - {runs_on: ubuntu-latest, name: "Windows ARM", archive_name: "windows-arm", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v1", test: false, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-armv7.cmake -G Ninja", LDFLAGS: "-static"} - {runs_on: ubuntu-latest, name: "Windows ARM64", archive_name: "windows-arm64", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v1", test: false, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-aarch64.cmake -G Ninja", LDFLAGS: "-static"} - # TODO(strager): Switch to MinGW for these builds. https://github.com/quick-lint/quick-lint-js/issues/678 - - {runs_on: windows-latest, name: "Windows ARM", archive_name: "windows-arm", archive_extension: ".zip", test: false, CMAKE_FLAGS: "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -A ARM"} runs-on: ${{ matrix.toolchain.runs_on }} container: ${{ matrix.toolchain.docker_container }} env: diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 172963db9a..43ad422193 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,7 +15,7 @@ Semantic Versioning. ### Changed -* Windows x86, x64, and ARM64 builds are now built with MinGW's C and C++ +* Windows builds (x86, x64, ARM, and ARM64) are now built with MinGW's C and C++ runtime libraries instead of Microsoft's. ## 2.3.1 (2022-03-24)