mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 00:44:27 +00:00
The compiler runs on Windows (and has seeds for macOS)
Windows: the compiler made from bootstrap/windows-x86_64.ll runs under Wine, compiles itself to the same IR, builds an exe of itself, and every test program passes through it. It needed: Windows-sized unsigned long for libclang's unsaved file, no 'cross' when Windows builds for Windows, --target passed to libclang (libclang.dll assumes MSVC), the MinGW triple always in the IR, FINCH_LDFLAGS, .exe names and FINCH_LLVM_INCLUDE in bootstrap/build.sh, winseed.sh/winbuild.sh. macOS: seeds for arm64 and x86-64 made with the 11.3 SDK; IR is accepted by clang, nothing has run on a Mac yet. CI gets a windows and a macos job. UNTESTED on real Windows/macOS runners. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015f73FesGZGYPkmDvUcj6QX
This commit is contained in:
parent
3e45b62812
commit
b53e0910d8
18 changed files with 398686 additions and 45576 deletions
47
.github/workflows/ci.yml
vendored
47
.github/workflows/ci.yml
vendored
|
|
@ -1,8 +1,8 @@
|
|||
name: CI
|
||||
|
||||
# The compiler is written in Finch. It is built from bootstrap/<system>.ll, its own LLVM IR (see bootstrap/README.md),
|
||||
# then from itself. Linux x86-64 and ARM64 have seeds; macOS and Windows machines can't build the compiler yet
|
||||
# (programs for them are built from Linux with --target, and tested here under Wine and qemu).
|
||||
# then from itself. Seeds: Linux x86-64 and ARM64 (tested here), Windows x86-64 (tested under Wine, and here),
|
||||
# macOS ARM64 and x86-64 (made with Apple's headers; only checked as IR until the macos job below passes).
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -74,6 +74,49 @@ jobs:
|
|||
FINCH_CC=aarch64-linux-gnu-gcc QEMU_LD_PREFIX=/usr/aarch64-linux-gnu tests/cross.sh arm64
|
||||
fi
|
||||
|
||||
macos:
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install LLVM 21 (libclang)
|
||||
run: brew install llvm@21 pkg-config
|
||||
- name: Build the compiler
|
||||
run: |
|
||||
export FINCH_CLANG="$(brew --prefix llvm@21)/bin/clang"
|
||||
export FINCH_LIBCLANG="-L$(brew --prefix llvm@21)/lib -lclang"
|
||||
export FINCH_LLVM_INCLUDE="$(brew --prefix llvm@21)/include"
|
||||
bootstrap/build.sh
|
||||
build/finch version
|
||||
- name: Tests
|
||||
run: tests/run.sh
|
||||
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download llvm-mingw (clang with MinGW headers) and LLVM for Windows (libclang.dll)
|
||||
run: |
|
||||
curl -sSL -o mingw.zip https://github.com/mstorsjo/llvm-mingw/releases/download/20251216/llvm-mingw-20251216-ucrt-x86_64.zip
|
||||
7z x -y mingw.zip -o/c/ > /dev/null
|
||||
curl -sSL -o llvm.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.8/LLVM-21.1.8-win64.exe
|
||||
7z x -y llvm.exe -o/c/llvm > /dev/null
|
||||
- name: Build the compiler
|
||||
run: |
|
||||
export PATH="/c/llvm-mingw-20251216-ucrt-x86_64/bin:$PATH"
|
||||
export FINCH_LIBCLANG="C:/llvm/bin/libclang.dll"
|
||||
export FINCH_LLVM_INCLUDE="C:/llvm/include"
|
||||
export FINCH_LDFLAGS="-LC:/llvm/bin"
|
||||
bootstrap/build.sh
|
||||
build/finch.exe version
|
||||
- name: Tests
|
||||
run: |
|
||||
export PATH="/c/llvm-mingw-20251216-ucrt-x86_64/bin:$PATH"
|
||||
export FINCH_LDFLAGS="-LC:/llvm/bin"
|
||||
FINCH=../build/finch.exe tests/run.sh
|
||||
|
||||
vscode:
|
||||
runs-on: ubuntu-24.04
|
||||
defaults:
|
||||
|
|
|
|||
Loading…
Reference in a new issue