Fixes Compilation error with --app:lib (#19965)

Fixes Compilation error with --app:lib  when a module tries to pull os.paramStr on posix by throwing a runtime exception instead. 
More details here: #19964
This commit is contained in:
Juan M Gómez 2022-07-10 15:40:26 +02:00 • committed by GitHub
commit a90763ebd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2939,7 +2939,7 @@ elif defined(genode):
proc paramCount*(): int = proc paramCount*(): int =
raise newException(OSError, "paramCount is not implemented on Genode") raise newException(OSError, "paramCount is not implemented on Genode")
elif weirdTarget: elif weirdTarget or (defined(posix) and appType == "lib"):
proc paramStr*(i: int): string {.tags: [ReadIOEffect].} = proc paramStr*(i: int): string {.tags: [ReadIOEffect].} =
raise newException(OSError, "paramStr is not implemented on current platform") raise newException(OSError, "paramStr is not implemented on current platform")