fix #14132 dsymutil should not be called on static libraries (#14133) [backport:1.2]

(cherry picked from commit b8d7a98265)
This commit is contained in:
Timothee Cour
2020-04-27 03:39:27 -07:00
committed by narimiran
parent 14ce3e45e0
commit 0136fc3e53

View File

@@ -836,12 +836,12 @@ proc execLinkCmd(conf: ConfigRef; linkCmd: string) =
proc maybeRunDsymutil(conf: ConfigRef; exe: AbsoluteFile) =
when defined(osx):
if optCDebug notin conf.globalOptions: return
# if needed, add an option to skip or override location
let cmd = "dsymutil " & $(exe).quoteShell
conf.extraCmds.add cmd
tryExceptOSErrorMessage(conf, "invocation of dsymutil failed."):
execExternalProgram(conf, cmd, hintExecuting)
if optCDebug in conf.globalOptions and optGenStaticLib notin conf.globalOptions:
# if needed, add an option to skip or override location
let cmd = "dsymutil " & $(exe).quoteShell
conf.extraCmds.add cmd
tryExceptOSErrorMessage(conf, "invocation of dsymutil failed."):
execExternalProgram(conf, cmd, hintExecuting)
proc execCmdsInParallel(conf: ConfigRef; cmds: seq[string]; prettyCb: proc (idx: int)) =
let runCb = proc (idx: int, p: Process) =