mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 16:54:25 +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
|
|
@ -534,7 +534,7 @@ fn importHeaders([]Header headers, []str dirs, str target, bool windows, str ccF
|
|||
index := clang_createIndex(0, 0)
|
||||
for h in headers {
|
||||
src := "#include \"" + h.path + "\"\n"
|
||||
file := CXUnsavedFile(Filename: "finch_import.c".ptr, Contents: src.ptr, Length: u64(src.len))
|
||||
file := host.unsavedFile("finch_import.c", src)
|
||||
ptr tu = null
|
||||
flags := CXTranslationUnit_DetailedPreprocessingRecord | CXTranslationUnit_SkipFunctionBodies
|
||||
err := clang_parseTranslationUnit2(index, "finch_import.c", argv.ptr, i32(argv.len), addr(file), 1, u32(flags), addr(tu))
|
||||
|
|
|
|||
Loading…
Reference in a new issue