From 9f4fd37153a84a7039b7e6a355a1c3374b0ba4ce Mon Sep 17 00:00:00 2001 From: tersec Date: Tue, 26 Mar 2024 18:00:23 +0000 Subject: [PATCH] quote and library paths for use in passc/passl to allow embedded spaces (#36) --- .github/workflows/ci.yml | 4 ++-- libbacktrace.nim | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2067ef4..4b8824b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/libbacktrace.nim b/libbacktrace.nim index 1c82e9d..6c6dc5f 100644 --- a/libbacktrace.nim +++ b/libbacktrace.nim @@ -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 @@ -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".} @@ -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) \ No newline at end of file