mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 08:54:25 +00:00
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
9 lines
510 B
Shell
Executable file
9 lines
510 B
Shell
Executable file
#!/bin/sh
|
|
# Makes bootstrap/windows-x86_64.ll from Linux, with a Linux-hosted llvm-mingw (MinGW headers) and the headers of an
|
|
# official LLVM for Windows (clang-c/Index.h):
|
|
# bootstrap/winseed.sh <finch> <llvm-mingw dir> <LLVM-for-Windows dir>
|
|
set -eu
|
|
cd "$(dirname "$0")/.."
|
|
finch=$1; mingw=$2; llvm=$3
|
|
PATH="$mingw/bin:$PATH" FINCH_CC="$mingw/bin/x86_64-w64-mingw32-clang" "$finch" ir src/main.fch --target windows -I "$llvm/include" > bootstrap/windows-x86_64.ll
|
|
echo "wrote bootstrap/windows-x86_64.ll"
|