Skip to content

Commit

Permalink
Dynlib fix for status-go integration (#97)
Browse files Browse the repository at this point in the history
* Dynlib fix as suggested in #31

* Update confutils.nim

* Declare empty commandLineParams if the standard one is not declared.

---------

Co-authored-by: Jacek Sieka <[email protected]>
  • Loading branch information
vitvly and arnetheduck authored Jan 25, 2024
1 parent 7217854 commit fa6e9b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions confutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,12 @@ func constructEnvKey*(prefix: string, key: string): string {.raises: [].} =
except ValueError as err:
raiseAssert "strformat.`&` failed: " & err.msg

# On Posix there is no portable way to get the command
# line from a DLL and thus the proc isn't defined in this environment.
# See https://nim-lang.org/docs/os.html#commandLineParams
when not declared(commandLineParams):
proc commandLineParams(): seq[string] = discard

proc loadImpl[C, SecondarySources](
Configuration: typedesc[C],
cmdLine = commandLineParams(),
Expand Down

0 comments on commit fa6e9b0

Please sign in to comment.