Skip to content

Commit

Permalink
Merge pull request #25 from xdoardo/llvm-18
Browse files Browse the repository at this point in the history
Update Windows version and use Ninja
  • Loading branch information
syrusakbary authored Sep 23, 2024
2 parents f96db93 + 9619cd7 commit 0378498
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 20 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ jobs:
os: "ubuntu-latest"
# os: ['self-hosted', 'linux', 'RISCV64']
- id: 'darwin-amd64'
os: 'macos-13'
tar_extra_args: ''
- id: 'darwin-aarch64'
os: 'macos-latest'
tar_extra_args: ''
# When unpacking an archive on Windows, the symlinks can't be
# created unless the target path already exists. This causes
# problems when the linked file is ordered after the link
- id: 'windows-amd64'
os: 'windows-2019'
os: 'windows-2022'
# When unpacking an archive on Windows, the symlinks can't be
# created unless the target path already exists. This causes
# problems when the linked file is ordered after the link
Expand Down Expand Up @@ -64,12 +70,11 @@ jobs:
run: |
brew install ninja
# TODO(jubianchi): Re-enable this to build on MingW
# - name: Install `ninja` on Windows
# if: startsWith(matrix.target.id, 'windows-')
# shell: bash
# run: |
# choco install ninja
- name: Install `ninja` on Windows
if: startsWith(matrix.target.id, 'windows-')
shell: bash
run: |
choco install ninja
- name: Build
if: matrix.target.id != 'windows-amd64' && matrix.target.id != 'linux-aarch64' && matrix.target.id != 'linux-riscv64'
Expand Down Expand Up @@ -169,7 +174,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/linux-aarch64-${{matrix.llvm_version}}/llvm.tar.xz
asset_name: linux-aarch64.tar.xz
asset_name: llvm-linux-aarch64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Linux (RISCV64)
Expand All @@ -179,7 +184,7 @@ jobs:
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/linux-riscv64-${{matrix.llvm_version}}/llvm.tar.xz
asset_name: linux-riscv64.tar.xz
asset_name: llvm-linux-riscv64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Darwin
Expand All @@ -192,6 +197,16 @@ jobs:
asset_name: llvm-darwin-amd64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Darwin (aarch64)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/darwin-aarch64-${{matrix.llvm_version}}/llvm.tar.xz
asset_name: llvm-darwin-aarch64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Windows
uses: actions/upload-release-asset@v1
env:
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,27 @@ assets](https://github.com/wasmerio/llvm-custom-builds/releases).
<td rowspan="5">18</td>
<td rowspan="3">amd64</td>
<td>Darwin</td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/darwin-amd64.tar.gz">download</a></td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/llvm-darwin-amd64.tar.xz">download</a></td>
</tr>
<tr>
<td>Linux</td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/linux-amd64.tar.gz">download</a></td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/llvm-linux-amd64.tar.xz">download</a></td>
</tr>
<tr>
<td>Windows</td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/windows-amd64.tar.gz">download</a></td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/llvm-windows-amd64.tar.xz">download</a></td>
</tr>
<tr>
<td>aarch64</td>
<td rowspan="2">aarch64</td>
<td>Linux</td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/linux-aarch64.tar.gz">download</a></td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/llvm-linux-aarch64.tar.xz">download</a></td>
<td>Darwin</td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/llvm-darwin-aarch64.tar.xz">download</a></td>
</tr>
<tr>
<td>riscv64</td>
<td>Linux</td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/linux-riscv64.tar.gz">download</a></td>
<td><a href="https://github.com/wasmerio/llvm-custom-builds/releases/download/18.x/llvm-linux-riscv64.tar.xz">download</a></td>
</tr>
<tr>
<td rowspan="5">16</td>
Expand Down
5 changes: 2 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if ([string]::IsNullOrEmpty($LLVM_VERSION)) {

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

Set-Location llvm-project
Expand All @@ -40,15 +40,14 @@ $CROSS_COMPILE = ""

# Run `cmake` to configure the project.
cmake `
-G "Visual Studio 16 2019" `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=MinSizeRel `
-DCMAKE_INSTALL_PREFIX=destdir `
-DLLVM_ENABLE_PROJECTS="clang;lld" `
-DLLVM_ENABLE_TERMINFO=OFF `
-DLLVM_ENABLE_ZLIB=OFF `
-DLLVM_INCLUDE_DOCS=OFF `
-DLLVM_INCLUDE_EXAMPLES=OFF `
-DLLVM_INCLUDE_GO_TESTS=OFF `
-DLLVM_INCLUDE_TESTS=OFF `
-DLLVM_INCLUDE_TOOLS=ON `
-DLLVM_INCLUDE_UTILS=OFF `
Expand Down
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi
# Clone the LLVM project.
if [ ! -d llvm-project ]
then
git clone "$LLVM_REPO_URL" llvm-project
git clone -b "release/$LLVM_VERSION" --single-branch --depth=1 "$LLVM_REPO_URL" llvm-project
fi


Expand Down Expand Up @@ -67,7 +67,6 @@ cmake \
-DLLVM_ENABLE_ZLIB=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_GO_TESTS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_TOOLS=ON \
-DLLVM_INCLUDE_UTILS=OFF \
Expand Down

0 comments on commit 0378498

Please sign in to comment.