Skip to content

Commit 92a76fd

Browse files
committed
Build/Test for x86_64-pc-windows-gnullvm
1 parent 028bcd9 commit 92a76fd

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/cross.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ jobs:
309309
- name: Run cargo test
310310
run: cargo build -p aws-lc-rs --features prebuilt-nasm --target x86_64-pc-windows-gnu
311311
open-harmony:
312+
if: github.repository_owner == 'aws'
312313
runs-on: ubuntu-latest
313314
env:
314315
DOCKER_BUILDKIT: 1
@@ -325,6 +326,7 @@ jobs:
325326
docker run -v "${{ github.workspace }}:/aws_lc_rs" ohos:5.0.0
326327
327328
alpine-linux:
329+
if: github.repository_owner == 'aws'
328330
runs-on: ubuntu-latest
329331
env:
330332
DOCKER_BUILDKIT: 1
@@ -339,3 +341,54 @@ jobs:
339341
- name: Build
340342
run: |
341343
docker run -v "${{ github.workspace }}:/aws_lc_rs" alpine:3.20
344+
345+
msys2-clang:
346+
if: github.repository_owner == 'aws'
347+
runs-on: windows-latest
348+
strategy:
349+
fail-fast: false
350+
matrix:
351+
include:
352+
- { sys: mingw64, env: x86_64, target: x86_64-pc-windows-gnu, cc: gcc, cxx: g++ }
353+
- { sys: mingw32, env: i686, target: i686-pc-windows-gnu, cc: gcc, cxx: g++ }
354+
- { sys: ucrt64, env: ucrt-x86_64, target: x86_64-pc-windows-gnu, cc: gcc, cxx: g++ }
355+
- { sys: clang64, env: clang-x86_64, target: x86_64-pc-windows-gnullvm, cc: clang, cxx: g++ }
356+
steps:
357+
- name: Install MSYS2
358+
uses: msys2/setup-msys2@v2
359+
id: setup_msys2
360+
with:
361+
msystem: ${{ matrix.sys }}
362+
update: true
363+
pacboy: >-
364+
llvm
365+
clang
366+
nasm
367+
go
368+
- name: Update Environment
369+
shell: bash
370+
run: |
371+
echo "GOPATH=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}" >> $GITHUB_ENV
372+
echo "GOROOT=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\lib\go" >> $GITHUB_ENV
373+
echo "CC=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin\${{ matrix.cc }}.exe" >> $GITHUB_ENV
374+
echo "CXX=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin\${{ matrix.cxx }}.exe" >> $GITHUB_ENV
375+
echo "${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin" >> $GITHUB_PATH
376+
- name: Fix bindgen clang64
377+
if: ${{ matrix.sys == 'clang64' }}
378+
shell: bash
379+
run: |
380+
CLANG_VERSION=$($CC --version | grep "clang version" | sed -e 's/clang version \([0-9]*\).*/\1/')
381+
echo "BINDGEN_EXTRA_CLANG_ARGS=-I${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\lib\clang\\${CLANG_VERSION}\include" >> $GITHUB_ENV
382+
- name: Checkout
383+
uses: actions/checkout@v4
384+
with:
385+
submodules: "recursive"
386+
- uses: dtolnay/rust-toolchain@master
387+
id: toolchain
388+
with:
389+
toolchain: stable
390+
target: ${{matrix.target}}
391+
- name: Build
392+
run: cargo build -p aws-lc-rs --target ${{matrix.target}} --features bindgen
393+
- name: Test
394+
run: cargo test -p aws-lc-rs --target ${{matrix.target}} --features bindgen

aws-lc-sys/builder/cmake_builder.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ impl CmakeBuilder {
273273
cmake_cfg.define("CMAKE_SYSTEM_NAME", "Windows");
274274
cmake_cfg.define("CMAKE_SYSTEM_PROCESSOR", "x86");
275275
}
276+
("gnullvm", arch) => {
277+
cmake_cfg.define("CMAKE_SYSTEM_NAME", "Windows");
278+
cmake_cfg.define("CMAKE_SYSTEM_PROCESSOR", arch);
279+
}
276280
_ => {}
277281
}
278282
if use_prebuilt_nasm() {

0 commit comments

Comments
 (0)