diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf 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 \ 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 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