Skip to content

Commit

Permalink
quote and library paths for use in passc/passl to allow embedded spac…
Browse files Browse the repository at this point in the history
…es (#36)
  • Loading branch information
tersec authored Mar 26, 2024
1 parent 0275701 commit 9f4fd37
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
include:
- target:
os: linux
builder: ubuntu-20.04
builder: ubuntu-latest
- target:
os: macos
builder: macos-12
builder: macos-latest
- target:
os: windows
builder: windows-latest
Expand Down
16 changes: 8 additions & 8 deletions libbacktrace.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2021 Status Research & Development GmbH
# Copyright (c) 2019-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0,
# * MIT license
Expand Down Expand Up @@ -27,22 +27,22 @@ when not (defined(nimscript) or defined(js)):
topLevelPath = currentSourcePath.parentDir().replace('\\', '/')
installPath = topLevelPath & "/install/usr"

{.passc: "-I" & topLevelPath.}
{.passc: "-I\"" & topLevelPath & "\"".}

when defined(cpp):
{.passl: installPath & "/lib/libbacktracenimcpp.a".}
{.passl: "\"" & installPath & "/lib/libbacktracenimcpp.a\"".}
else:
{.passl: installPath & "/lib/libbacktracenim.a".}
{.passl: "\"" & installPath & "/lib/libbacktracenim.a\"".}

when defined(libbacktraceUseSystemLibs):
{.passl: "-lbacktrace".}
when defined(macosx) or defined(windows):
{.passl: "-lunwind".}
else:
{.passc: "-I" & installPath & "/include".}
{.passl: installPath & "/lib/libbacktrace.a".}
{.passc: "-I\"" & installPath & "/include\"".}
{.passl: "\"" & installPath & "/lib/libbacktrace.a\"".}
when defined(macosx) or defined(windows):
{.passl: installPath & "/lib/libunwind.a".}
{.passl: "\"" & installPath & "/lib/libunwind.a\"".}

when defined(windows):
{.passl: "-lpsapi".}
Expand Down Expand Up @@ -117,4 +117,4 @@ when not (defined(nimscript) or defined(js)):
reverse(result)

when defined(nimStackTraceOverride) and declared(registerStackTraceOverrideGetDebuggingInfo):
registerStackTraceOverrideGetDebuggingInfo(libbacktrace.getDebuggingInfo)
registerStackTraceOverrideGetDebuggingInfo(libbacktrace.getDebuggingInfo)

0 comments on commit 9f4fd37

Please sign in to comment.