From d65e8211a18d704db588d6ddc61406fe245d547e Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 23 Mar 2026 09:14:29 +0500 Subject: [PATCH 1/4] make: run lang cases on windows --- .github/workflows/build.yml | 6 ++---- Makefile | 8 +++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d455494..0e7217a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] defaults: run: @@ -41,7 +41,5 @@ jobs: - run: make run-cases if: runner.os != 'Windows' - - run: make run-cases + - run: make run-cases-windows if: runner.os == 'Windows' - env: - CFLAGS: "-g -std=gnu11 -Wall -Wextra -Werror -Wno-shadow -lm" diff --git a/Makefile b/Makefile index 9a1a624..444a219 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,14 @@ dist: @echo "Created dist/solod.tar.gz" run-cases: + @make run-cases-by pattern="testdata/lang/*/ testdata/std/*/" + +run-cases-windows: + @make run-cases-by CFLAGS="-g -std=gnu11 -Wall -Wextra -Werror -Wno-shadow -lm" pattern="testdata/lang/*/" + +run-cases-by: @failed=0; \ - for dir in testdata/lang/*/ testdata/std/*/; do \ + for dir in $(pattern); do \ name=$${dir#testdata/}; \ name=$${name%/}; \ if make run-case name=$$name > /tmp/so_test_out.txt 2>&1; then \ From cd16a8e72f1aa8a87137a29ddc910fcb92e3eec4 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 23 Mar 2026 09:29:31 +0500 Subject: [PATCH 2/4] git: force eol=lf --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf From 838a83a1ee6eeebaa3083d4d5905229505bf8766 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 23 Mar 2026 09:38:27 +0500 Subject: [PATCH 3/4] builtin: windows alloca support --- internal/compiler/builtin/builtin.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/compiler/builtin/builtin.h b/internal/compiler/builtin/builtin.h index f79c341..e603b1f 100644 --- a/internal/compiler/builtin/builtin.h +++ b/internal/compiler/builtin/builtin.h @@ -1,6 +1,11 @@ #pragma once +#ifdef _WIN32 +#include +#else #include +#endif + #include #include #include From fc8e2456c42ef372acdbbd4ade1b7e1a269de05b Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 23 Mar 2026 13:55:30 +0500 Subject: [PATCH 4/4] doc/readme: windows support --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf3488e..8e43b2f 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ So generates C11 code that relies on several GCC/Clang extensions: You can use GCC, Clang, or `zig cc` to compile the transpiled C code. MSVC is not supported. -Supported operating systems: Linux, macOS, and Windows (partial support). +Supported operating systems: Linux, macOS, and Windows (core language only). ## Design decisions