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

(cherry picked from commit a90763ebd7)
This commit is contained in:
Juan M Gómez
2022-07-10 15:40:26 +02:00
committed by narimiran
parent 81a52fae78
commit 22d043997c

View File

@@ -2944,7 +2944,7 @@ elif defined(genode):
proc paramCount*(): int =
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].} =
raise newException(OSError, "paramStr is not implemented on current platform")