Switch maintanance (#18668)

* Fix and improve Nintendo Switch support

* Document the necessity for nimAllocPagesViaMalloc

* update changelog

* Use --gc:orc in examples
This commit is contained in:
RSDuck 2021-08-11 08:54:49 +02:00 • committed by GitHub
commit d0dd923acf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 165 deletions

View file

@ -2910,13 +2910,6 @@ elif defined(nodejs):
result = $argv[i]
else:
raise newException(IndexDefect, formatErrorIndexBound(i - 1, argv.len - 2))
elif defined(nintendoswitch):
proc paramStr*(i: int): string {.tags: [ReadIOEffect].} =
raise newException(OSError, "paramStr is not implemented on Nintendo Switch")
proc paramCount*(): int {.tags: [ReadIOEffect].} =
raise newException(OSError, "paramCount is not implemented on Nintendo Switch")
elif defined(windows):
# Since we support GUI applications with Nim, we sometimes generate
# a WinMain entry proc. But a WinMain proc has no access to the parsed
@ -3190,7 +3183,7 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1", tags: [ReadIOEffect], noW
result = getApplAux("/proc/self/exe")
elif defined(solaris):
result = getApplAux("/proc/" & $getpid() & "/path/a.out")
elif defined(genode) or defined(nintendoswitch):
elif defined(genode):
raiseOSError(OSErrorCode(-1), "POSIX command line not supported")
elif defined(freebsd) or defined(dragonfly) or defined(netbsd):
result = getApplFreebsd()