mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
@@ -16,12 +16,16 @@
|
||||
// c compiler
|
||||
"cc": "cc",
|
||||
// c sources
|
||||
"csources": [
|
||||
"./csource/**"
|
||||
],
|
||||
"targets": {
|
||||
"hello_world": {
|
||||
"type": "executable",
|
||||
"csources": [
|
||||
"./csource/**"
|
||||
]
|
||||
},
|
||||
"hello_world_win32": {
|
||||
"type": "executable",
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user