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

This commit is contained in:
Timothee Cour 2020-04-27 03:39:27 -07:00 • committed by GitHub
commit b8d7a98265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -850,7 +850,7 @@ proc execLinkCmd(conf: ConfigRef; linkCmd: string) =
proc maybeRunDsymutil(conf: ConfigRef; exe: AbsoluteFile) = proc maybeRunDsymutil(conf: ConfigRef; exe: AbsoluteFile) =
when defined(osx): when defined(osx):
if optCDebug notin conf.globalOptions: return if optCDebug in conf.globalOptions and optGenStaticLib notin conf.globalOptions:
# if needed, add an option to skip or override location # if needed, add an option to skip or override location
let cmd = "dsymutil " & $(exe).quoteShell let cmd = "dsymutil " & $(exe).quoteShell
conf.extraCmds.add cmd conf.extraCmds.add cmd