0.2.0. Build system improvements. Target changes x64-windows -> windows-x64, x64-darwin -> macos-x64. Improved mac support. LLD linking for Mac, Windows, Linux. Cross linking for Mac, Windows. Clean up string use. Fix of debug handling of multiple compilation units per module. MSVC CI

This commit is contained in:
Christoffer Lerno
2022-04-18 18:31:49 +02:00
parent 7df7dd2933
commit 890c4bc435
216 changed files with 2518 additions and 1406 deletions

View File

@@ -1,7 +1,13 @@
module hello_world;
import bar;
$if (env::OS_TYPE == OsType.WIN32):
fn int test_doubler(int x)
{
return x * x;
}
$else:
extern fn int test_doubler(int);
$endif;
extern fn void printf(char *, ...);
fn int main()
@@ -9,5 +15,5 @@ fn int main()
printf("Hello World!\n");
bar::test();
printf("Hello double: %d\n", test_doubler(11));
return 1;
return 17;
}

View File

@@ -16,12 +16,16 @@
// c compiler
"cc": "cc",
// c sources
"csources": [
"./csource/**"
],
"targets": {
"hello_world": {
"type": "executable",
"csources": [
"./csource/**"
]
},
"hello_world_win32": {
"type": "executable",
}
},
}