summary refs log tree commit diff stats
path: root/compiler/extccomp.nim
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-05-07 02:29:31 +0200
committerdef <dennis@felsin9.de>2015-05-07 02:29:31 +0200
commit81cff0908e23d5c902f00a86bb19e00de6589cc3 (patch)
treee156bd1d11d1313f64d1c2db2255323f2ac7f09e /compiler/extccomp.nim
parentb9e02b1efc14a309e613ec4d4cf8c793503bc797 (diff)
downloadNim-81cff0908e23d5c902f00a86bb19e00de6589cc3.tar.gz
Fix the lib path used with --app:staticlib
For example if gProjectName is "src/false.nim" the old static lib name
was "libsrc/false.nim.a", now it is "libfalse.a".
Diffstat (limited to 'compiler/extccomp.nim')
-rw-r--r--compiler/extccomp.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index 26f0318ee..7d777b0e3 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -668,7 +668,8 @@ proc callCCompiler*(projectfile: string) =
       it = PStrEntry(it.next)
 
     if optGenStaticLib in gGlobalOptions:
-      linkCmd = CC[c].buildLib % ["libfile", (libNameTmpl() % gProjectName),
+      let (_, name, _) = splitFile(gProjectName)
+      linkCmd = CC[c].buildLib % ["libfile", (libNameTmpl() % name),
                                   "objfiles", objfiles]
     else:
       var linkerExe = getConfigVar(c, ".linkerexe")