mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
Build LLVM for Windows using MSVC-compatible Clang (#497)
## Description Switches the Windows LLVM build from Visual Studio to `clang-cl` + `lld-link` (Clang's MSVC-compatible drivers) with Ninja. This is in order to better match the Clang toolchain used on our Linux and macOS variants, while keeping the MSVC ABI. It also speeds up the build time by at least 2x on Windows.
This commit is contained in:
4 files changed
+35
-13
No files matched your search
@@ -73,6 +73,7 @@ jobs:
|
||||
contents: write # for uploading assets to release
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
# without this it will override our rust flags
|
||||
@@ -101,6 +102,13 @@ jobs:
|
||||
run: |
|
||||
choco install ninja
|
||||
|
||||
# Provides MSVC toolchain (ml64, headers, libs) used by clang-cl when building LLVM.
|
||||
- name: Set Up MSVC Developer Environment
|
||||
if: ${{ matrix.host == 'windows' }}
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Install LLVM Builder
|
||||
run: |
|
||||
cargo install --locked --force --path crates/llvm-builder
|
||||
|
||||
@@ -40,6 +40,18 @@ jobs:
|
||||
run: |
|
||||
brew install ninja
|
||||
|
||||
- name: Install Dependencies
|
||||
if: matrix.runner == 'windows-2022'
|
||||
run: |
|
||||
choco install ninja
|
||||
|
||||
# Provides MSVC toolchain (ml64, headers, libs) used by clang-cl when building LLVM.
|
||||
- name: Set Up MSVC Developer Environment
|
||||
if: matrix.runner == 'windows-2022'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Test
|
||||
run: make test-llvm-builder
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user