From b8d7a98265161ff281815b2c23e02aae3e5d9862 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 27 Apr 2020 03:39:27 -0700 Subject: [PATCH] fix #14132 dsymutil should not be called on static libraries (#14133) [backport:1.2] --- compiler/extccomp.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 3005d111ac8d7..37b33bf64a014 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -850,12 +850,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) =