Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
6 changes: 2 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

defaults:
run:
Expand All @@ -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"
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions internal/compiler/builtin/builtin.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#pragma once

#ifdef _WIN32
#include <malloc.h>
#else
#include <alloca.h>
#endif

#include <inttypes.h>
#include <stdalign.h>
#include <stdbool.h>
Expand Down