Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f458a57
windows: resolve native toolchain profiles from Go inputs
cpunion Aug 27, 2026
6464ee7
windows: use native dependency names and archive extraction
cpunion Aug 27, 2026
2cd1b70
ci: use a standalone Windows MSVC toolchain
cpunion Aug 27, 2026
57ad4e6
ci: retain vcpkg version metadata in native setup
cpunion Aug 27, 2026
10b72aa
ci: make pinned vcpkg ports available offline
cpunion Aug 27, 2026
77065dc
test: accept the selected Windows archive backend
cpunion Aug 27, 2026
83d32bb
windows: select compiler-rt for MSVC links
cpunion Aug 27, 2026
383e1eb
ci: preserve native dependencies after setup
cpunion Aug 27, 2026
78e5da6
ci: use native pkgconf on Windows
cpunion Aug 27, 2026
2f8961d
build: accept empty external linker flags like Go
cpunion Aug 27, 2026
2d3a548
ci: expose LLVM libraries through native pkgconf
cpunion Aug 27, 2026
69714fe
build: honor PKG_CONFIG like Go
cpunion Aug 27, 2026
020a39a
windows: resolve lib-prefixed MSVC libraries
cpunion Aug 27, 2026
dec480e
ci: invoke the Windows demo compiler directly
cpunion Aug 27, 2026
0474d2d
ci: use a full-target native Windows LLVM
cpunion Aug 27, 2026
d06e92f
ci: align Windows objects with the dynamic MSVC CRT
cpunion Aug 27, 2026
a1494d6
windows: align the implicit MSVC profile with vcpkg
cpunion Aug 27, 2026
5f6ac45
ci: preserve native pkgconf through Python setup
cpunion Aug 27, 2026
5d2f83c
ci: use configured pkgconf in Windows checks
cpunion Aug 27, 2026
f7d62f6
ci: capture Windows smoke output from both streams
cpunion Aug 27, 2026
f4a33bb
test: cover native pkg-config command selection
cpunion Aug 27, 2026
52099ca
windows: normalize MSVC llvm-config library flags
cpunion Aug 27, 2026
3100626
ci: build native FileCheck for Windows tests
cpunion Aug 27, 2026
ecf9c99
ci: preserve vcpkg paths in native Windows tests
cpunion Aug 27, 2026
2565eec
ci: compile native Windows wrappers as C++17
cpunion Aug 27, 2026
bb56f62
ci: link FileCheck system libraries through Clang
cpunion Aug 27, 2026
2a0c1c0
ci: use configured pkgconf in Windows demos
cpunion Aug 27, 2026
6bc3e8b
ci: capture native output across PowerShell versions
cpunion Aug 27, 2026
a0dde5d
build: scope native Windows toolchain parsing
cpunion Aug 27, 2026
4b5c480
windows: isolate GNU profiles from MSVC environment
cpunion Aug 27, 2026
45bc2e9
test: use selected Windows dependency profile
cpunion Aug 27, 2026
a21a92c
windows: infer native ABI from default Clang target
cpunion Aug 27, 2026
8bab4c8
ci: provide isolated Windows dependency profiles
cpunion Aug 27, 2026
8c411a9
ci: exercise MSVC and MinGW profiles independently
cpunion Aug 27, 2026
d2f4a80
test: cover the selected native Windows profile
cpunion Aug 27, 2026
1e89320
ci: expose Windows dependency profiles to each shell
cpunion Aug 27, 2026
9a96bfe
windows: honor the resolved native GNU ABI
cpunion Aug 27, 2026
7b97d08
windows: support MinGW shared library artifacts
cpunion Aug 27, 2026
e95e4e3
windows: restore amd64 panic contexts without CRT unwind
cpunion Aug 27, 2026
48d23e4
ci: build the WAMR test runner from source
cpunion Aug 28, 2026
4d08491
benchmark: build workloads from their source checkout
cpunion Aug 28, 2026
bf7366d
xtool/nm: accept Windows line endings
cpunion Aug 28, 2026
c216433
cabi: use the Windows aggregate ABI for MinGW
cpunion Aug 28, 2026
2c6edc9
runtime/ffi: select the MinGW x64 ABI
cpunion Aug 28, 2026
a55071d
ci: build WAMR with the MinGW toolchain
cpunion Aug 28, 2026
70ff2b9
ci: install LLDB for the MinGW profile
cpunion Aug 28, 2026
6385c29
demo: link the MSVC c-archive stdio bridge
cpunion Aug 28, 2026
e31a8e9
debug: retain Windows LLDB marker through linking
cpunion Aug 28, 2026
f714ebd
ci: run MinGW LLDB tests in CLANG64 shell
cpunion Aug 28, 2026
44af39d
test: stabilize protected-memory fault recovery
cpunion Aug 28, 2026
450e9e6
ci: configure Python home for Windows LLDB
cpunion Aug 28, 2026
4d8ef7c
ci: use the configured Python home for Windows LLDB
cpunion Aug 28, 2026
ac790f3
ci: match MSVC LLDB Python patch version
cpunion Aug 28, 2026
69be536
test: support compiler flags in LLDB fixtures
cpunion Aug 28, 2026
ecf105d
crosscompile: avoid ESP toolchain lookup on native Windows
cpunion Aug 28, 2026
115748f
deps: use goplus lib v0.5.0
cpunion Aug 29, 2026
0b66e0c
runtime/libuv: remove obsolete demos
cpunion Aug 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 53 additions & 16 deletions .github/actions/setup-demo-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
name: "Setup Demo Dependencies"
description: "Install dependencies required by the LLGo demo suite"
inputs:
windows-abi:
description: "Native Windows toolchain profile: msvc or mingw"
required: false
default: "msvc"

runs:
using: "composite"
steps:
- name: Set up Python 3.12 on Windows
if: runner.os == 'Windows'
id: windows_python
uses: actions/setup-python@v6
with:
python-version: "3.12"
# LLVM 19.1.3's MSVC LLDB embeds the 3.12.7 hosted-tool-cache prefix.
# A newer 3.12 patch is ABI-compatible, but LLDB combines its embedded
# stdlib path with that installation and cannot import encodings. Keep
# the MinGW demo environment on the normal latest 3.12 patch.
python-version: ${{ inputs.windows-abi == 'msvc' && '3.12.7' || '3.12' }}
# setup-python otherwise replaces PKG_CONFIG_PATH, hiding the native
# vcpkg metadata installed by setup-deps from LLGo's runtime build.
update-environment: false

- name: Install cargs demo library on Unix
if: runner.os != 'Windows'
Expand Down Expand Up @@ -58,11 +71,23 @@ runs:
run: |
$ErrorActionPreference = "Stop"

$architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
switch ($architecture) {
"X64" { $targetTriple = "x86_64-pc-windows-msvc" }
"Arm64" { $targetTriple = "aarch64-pc-windows-msvc" }
default { throw "Unsupported Windows architecture: $architecture" }
if ("${{ inputs.windows-abi }}" -notin @("msvc", "mingw")) {
throw "Unsupported Windows ABI profile: ${{ inputs.windows-abi }}"
}
$compiler = (Get-Command clang.exe).Source
$target = (& $compiler -dumpmachine).Trim()
if ("${{ inputs.windows-abi }}" -eq "msvc") {
if ($target -notmatch "-windows-msvc$") {
throw "The MSVC profile resolved Clang target $target"
}
$runtimeArgs = @("-fms-runtime-lib=dll")
$archive = "cargs.lib"
} else {
if ($target -notmatch "-(windows-gnu|mingw32)$") {
throw "The MinGW profile resolved Clang target $target"
}
$runtimeArgs = @()
$archive = "libcargs.a"
}

$libsDir = Join-Path $env:GITHUB_WORKSPACE "_demo\c\cargs\libs"
Expand All @@ -77,18 +102,22 @@ runs:
Invoke-WebRequest "$baseUrl/src/cargs.c" -OutFile $source

$object = Join-Path $env:RUNNER_TEMP "cargs.obj"
& $env:CC "--target=$targetTriple" -O2 -std=c11 `
& $compiler @runtimeArgs -O2 -std=c11 `
"-I$includeDir" -c $source -o $object
if ($LASTEXITCODE -ne 0) {
throw "Compiling cargs failed with exit code $LASTEXITCODE"
}
& llvm-lib "/out:$(Join-Path $libDir 'cargs.lib')" $object
if ("${{ inputs.windows-abi }}" -eq "msvc") {
& llvm-lib "/out:$(Join-Path $libDir $archive)" $object
} else {
& llvm-ar rcs (Join-Path $libDir $archive) $object
}
if ($LASTEXITCODE -ne 0) {
throw "Archiving cargs failed with exit code $LASTEXITCODE"
}

# A static MSVC library avoids a demo-only DLL search path. pkgconf's
# logical -lcargs entry is resolved by LLGo's Windows dependency path.
# A static target-native library avoids a demo-only DLL search path.
# Each profile's pkg-config resolves -lcargs to its own archive format.
# Windows pkgconf relocates a variable named "prefix" relative to the
# .pc file by default. Keep these installation paths absolute because
# the metadata intentionally lives under RUNNER_TEMP, not the library.
Expand All @@ -105,8 +134,6 @@ runs:
Cflags: -I"`${includedir}"
"@ | Set-Content -Encoding ascii (Join-Path $pcDir "cargs.pc")

Add-Content -Encoding utf8 $env:GITHUB_ENV "PKG_CONFIG_PATH=$pcDir;$env:PKG_CONFIG_PATH"

- name: Install Python demo dependencies on Unix
if: runner.os != 'Windows'
shell: bash
Expand All @@ -129,19 +156,26 @@ runs:
run: |
$ErrorActionPreference = "Stop"

python -m pip install numpy torch
$python = "${{ steps.windows_python.outputs.python-path }}"
& $python -m pip install numpy torch
if ($LASTEXITCODE -ne 0) {
throw "Installing Python demo dependencies failed with exit code $LASTEXITCODE"
}

$prefix = (& python -c "import sys; print(sys.base_prefix)").Trim()
$includeDir = (& python -c "import sysconfig; print(sysconfig.get_path('include'))").Trim()
$version = (& python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')").Trim()
$prefix = (& $python -c "import sys; print(sys.base_prefix)").Trim()
$includeDir = (& $python -c "import sysconfig; print(sysconfig.get_path('include'))").Trim()
$version = (& $python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')").Trim()
$libDir = Join-Path $prefix "libs"
$importLibrary = Join-Path $libDir "python$version.lib"
if (-not (Test-Path $importLibrary)) {
throw "Python import library was not found at $importLibrary"
}
if ("${{ inputs.windows-abi }}" -eq "mingw") {
# LLVM's MinGW linker accepts the same COFF import-library contents
# but its -l search uses the GNU filename. Keep the official Python
# artifact untouched and expose only a profile-local spelling.
Copy-Item -Force $importLibrary (Join-Path $libDir "libpython$version.a")
}

$pcDir = Join-Path $env:RUNNER_TEMP "llgo-pkgconfig"
New-Item -ItemType Directory -Force $pcDir | Out-Null
Expand All @@ -157,3 +191,6 @@ runs:
Libs: -L"`${libdir}" -lpython$version
Cflags: -I"`${includedir}"
"@ | Set-Content -Encoding ascii (Join-Path $pcDir "python3-embed.pc")

Add-Content -Encoding utf8 $env:GITHUB_PATH $prefix
Add-Content -Encoding utf8 $env:GITHUB_ENV "LLGO_WINDOWS_PYTHON_HOME=$prefix"
Loading
Loading