--os:standalone works again

This commit is contained in:
Araq
2013-06-30 21:15:28 +02:00
parent 651103ff32
commit 52851b722d
16 changed files with 552 additions and 621 deletions

View File

@@ -0,0 +1,4 @@
proc printf(frmt: cstring) {.varargs, header: "<stdio.h>", cdecl.}
printf("hi %ld\n", 4777)

View File

@@ -0,0 +1,2 @@
--os:standalone
--deadCodeElim:on

View File

@@ -0,0 +1,19 @@
proc printf(frmt: cstring) {.varargs, importc, header: "<stdio.h>", cdecl.}
proc exit(code: int) {.importc, header: "<stdlib.h>", cdecl.}
{.push stack_trace: off, profiler:off.}
proc rawoutput(s: string) =
printf("%s\n", s)
proc panic(s: string) =
rawoutput(s)
exit(1)
# Alternatively we also could implement these 2 here:
#
# template sysFatal(exceptn: typeDesc, message: string)
# template sysFatal(exceptn: typeDesc, message, arg: string)
{.pop.}