summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-07-30 12:04:00 +0200
committerAraq <rumpf_a@web.de>2018-07-30 12:20:58 +0200
commitd270245a0171c4532c9121e7e27dfd422f123840 (patch)
tree9b752a65608d645b5b2b9313d2f7881356ecb054
parente86a0ecd8676c028b60673133d93f53dc12c1b4c (diff)
downloadNim-d270245a0171c4532c9121e7e27dfd422f123840.tar.gz
disable --app:gui for non Windows targets; fixes #2576
-rw-r--r--compiler/extccomp.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index 34628e363..f4ef93070 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -668,8 +668,10 @@ proc getLinkCmd(conf: ConfigRef; projectfile, objfiles: string): string =
     if needsExeExt(conf): linkerExe = addFileExt(linkerExe, "exe")
     if noAbsolutePaths(conf): result = linkerExe
     else: result = joinPath(conf.cCompilerpath, linkerExe)
-    let buildgui = if optGenGuiApp in conf.globalOptions: CC[conf.cCompiler].buildGui
-                   else: ""
+    let buildgui = if optGenGuiApp in conf.globalOptions and conf.target.targetOS == osWindows:
+                     CC[conf.cCompiler].buildGui
+                   else:
+                     ""
     var exefile, builddll: string
     if optGenDynLib in conf.globalOptions:
       exefile = platform.OS[conf.target.targetOS].dllFrmt % splitFile(projectfile).name