Add support from compiling c from c3c.

This commit is contained in:
Christoffer Lerno
2021-12-09 23:38:57 +01:00
parent 379a66a14b
commit 8aa00b015b
10 changed files with 98 additions and 20 deletions

View File

@@ -0,0 +1,4 @@
int test_doubler(int d)
{
return d * d;
}

View File

@@ -1,11 +1,13 @@
module hello_world;
import bar;
extern fn void printf(char *hello);
extern fn int test_doubler(int);
extern fn void printf(char *, ...);
fn int main(int x)
{
printf("Hello World!\n");
bar::test();
printf("Hello double: %d\n", test_doubler(11));
return 1;
}

View File

@@ -8,3 +8,7 @@ warnings = ["no-unused"]
sources = ["./**"]
# libraries to use
libs = []
# c compiler
cc = "cc"
# c sources
csources = ["./csource/**"]