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
parent ed2bf02a51
commit a90763ebd7

View File

@@ -2939,7 +2939,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")