Skip to content

Commit dc57f98

Browse files
committed
Update Windows version and use Ninja
1 parent 5787cf2 commit dc57f98

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
os: 'macos-latest'
2323
tar_extra_args: ''
2424
- id: 'windows-amd64'
25-
os: 'windows-2019'
25+
os: 'windows-2022'
2626
# When unpacking an archive on Windows, the symlinks can't be
2727
# created unless the target path already exists. This causes
2828
# problems when the linked file is ordered after the link
@@ -64,12 +64,11 @@ jobs:
6464
run: |
6565
brew install ninja
6666
67-
# TODO(jubianchi): Re-enable this to build on MingW
68-
# - name: Install `ninja` on Windows
69-
# if: startsWith(matrix.target.id, 'windows-')
70-
# shell: bash
71-
# run: |
72-
# choco install ninja
67+
- name: Install `ninja` on Windows
68+
if: startsWith(matrix.target.id, 'windows-')
69+
shell: bash
70+
run: |
71+
choco install ninja
7372
7473
- name: Build
7574
if: matrix.target.id != 'windows-amd64' && matrix.target.id != 'linux-aarch64' && matrix.target.id != 'linux-riscv64'

build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if ([string]::IsNullOrEmpty($LLVM_VERSION)) {
1717

1818
# Clone the LLVM project.
1919
if (-not (Test-Path -Path "llvm-project" -PathType Container)) {
20-
git clone "$LLVM_REPO_URL" llvm-project
20+
git clone -b "release/$LLVM_VERSION" --single-branch --depth=1 "$LLVM_REPO_URL" llvm-project
2121
}
2222

2323
Set-Location llvm-project
@@ -40,18 +40,18 @@ $CROSS_COMPILE = ""
4040

4141
# Run `cmake` to configure the project.
4242
cmake `
43-
-G "Visual Studio 16 2019" `
43+
-G "Ninja" `
4444
-DCMAKE_BUILD_TYPE=MinSizeRel `
4545
-DCMAKE_INSTALL_PREFIX=destdir `
46-
-DLLVM_ENABLE_PROJECTS="clang;lld" `
46+
-DLLVM_ENABLE_PROJECTS="polly;lldb;lld;compiler-rt;clang-tools-extra;clang" `
4747
-DLLVM_ENABLE_TERMINFO=OFF `
4848
-DLLVM_ENABLE_ZLIB=OFF `
4949
-DLLVM_INCLUDE_DOCS=OFF `
5050
-DLLVM_INCLUDE_EXAMPLES=OFF `
5151
-DLLVM_INCLUDE_GO_TESTS=OFF `
5252
-DLLVM_INCLUDE_TESTS=OFF `
5353
-DLLVM_INCLUDE_TOOLS=ON `
54-
-DLLVM_INCLUDE_UTILS=OFF `
54+
-DLLVM_INCLUDE_UTILS=ON `
5555
-DLLVM_OPTIMIZED_TABLEGEN=ON `
5656
-DLLVM_TARGETS_TO_BUILD="X86;AArch64;RISCV;WebAssembly" `
5757
$CROSS_COMPILE `

build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
# Clone the LLVM project.
2424
if [ ! -d llvm-project ]
2525
then
26-
git clone "$LLVM_REPO_URL" llvm-project
26+
git clone -b "release/$LLVM_VERSION" --single-branch --depth=1 "$LLVM_REPO_URL" llvm-project
2727
fi
2828

2929

@@ -62,15 +62,14 @@ cmake \
6262
-G Ninja \
6363
-DCMAKE_BUILD_TYPE=MinSizeRel \
6464
-DCMAKE_INSTALL_PREFIX="/" \
65-
-DLLVM_ENABLE_PROJECTS="clang;lld" \
65+
-DLLVM_ENABLE_PROJECTS="polly;lldb;lld;compiler-rt;clang-tools-extra;clang" \
6666
-DLLVM_ENABLE_TERMINFO=OFF \
6767
-DLLVM_ENABLE_ZLIB=OFF \
6868
-DLLVM_INCLUDE_DOCS=OFF \
6969
-DLLVM_INCLUDE_EXAMPLES=OFF \
70-
-DLLVM_INCLUDE_GO_TESTS=OFF \
7170
-DLLVM_INCLUDE_TESTS=OFF \
7271
-DLLVM_INCLUDE_TOOLS=ON \
73-
-DLLVM_INCLUDE_UTILS=OFF \
72+
-DLLVM_INCLUDE_UTILS=ON \
7473
-DLLVM_OPTIMIZED_TABLEGEN=ON \
7574
-DLLVM_TARGETS_TO_BUILD="X86;AArch64;RISCV;WebAssembly" \
7675
"${CROSS_COMPILE}" \

0 commit comments

Comments
 (0)