Skip to content

Commit 7bfd6dd

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

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/cross.yml

Lines changed: 47 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,48 @@ 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+
clang
365+
nasm
366+
go
367+
- name: Update Environment
368+
shell: bash
369+
run: |
370+
echo "GOPATH=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}" >> $GITHUB_ENV
371+
echo "GOROOT=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\lib\go" >> $GITHUB_ENV
372+
echo "CC=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin\${{ matrix.cc }}.exe" >> $GITHUB_ENV
373+
echo "CXX=${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin\${{ matrix.cxx }}.exe" >> $GITHUB_ENV
374+
echo "BINDGEN_EXTRA_CLANG_ARGS=-I${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}" >> $GITHUB_ENV
375+
echo "${{ steps.setup_msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin" >> $GITHUB_PATH
376+
- name: Checkout
377+
uses: actions/checkout@v4
378+
with:
379+
submodules: "recursive"
380+
- uses: dtolnay/rust-toolchain@master
381+
id: toolchain
382+
with:
383+
toolchain: stable
384+
target: ${{matrix.target}}
385+
- name: Build
386+
run: cargo build -p aws-lc-rs --target ${{matrix.target}} --features bindgen
387+
- name: Test
388+
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)