--os:standalone works again
This commit is contained in:
parent
651103ff32
commit
52851b722d
16 changed files with 552 additions and 621 deletions
4
tests/manyloc/standalone/barebone.nim
Normal file
4
tests/manyloc/standalone/barebone.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
proc printf(frmt: cstring) {.varargs, header: "<stdio.h>", cdecl.}
|
||||
|
||||
printf("hi %ld\n", 4777)
|
||||
2
tests/manyloc/standalone/barebone.nimrod.cfg
Normal file
2
tests/manyloc/standalone/barebone.nimrod.cfg
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
--os:standalone
|
||||
--deadCodeElim:on
|
||||
19
tests/manyloc/standalone/panicoverride.nim
Normal file
19
tests/manyloc/standalone/panicoverride.nim
Normal 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.}
|
||||
Loading…
Add table
Add a link
Reference in a new issue