From 31ecec64732bd057327291218bc3a202be0cfcad Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Sun, 3 Sep 2017 06:09:22 +0700 Subject: [PATCH] Allow to modify backend link template (#6173) --- compiler/extccomp.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index ede6ad6bf0..c47e4fb9a4 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -677,11 +677,14 @@ proc getLinkCmd(projectfile, objfiles: string): string = exefile = quoteShell(exefile) let linkOptions = getLinkOptions() & " " & getConfigVar(cCompiler, ".options.linker") + var linkTmpl = getConfigVar(cCompiler, ".linkTmpl") + if linkTmpl.len == 0: + linkTmpl = CC[cCompiler].linkTmpl result = quoteShell(result % ["builddll", builddll, "buildgui", buildgui, "options", linkOptions, "objfiles", objfiles, "exefile", exefile, "nim", getPrefixDir(), "lib", libpath]) result.add ' ' - addf(result, CC[cCompiler].linkTmpl, ["builddll", builddll, + addf(result, linkTmpl, ["builddll", builddll, "buildgui", buildgui, "options", linkOptions, "objfiles", objfiles, "exefile", exefile, "nim", quoteShell(getPrefixDir()),