diff options
| -rw-r--r-- | xmake/core/tool/linker.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index d18bf3bd3..994695480 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -229,8 +229,11 @@ function linker:link(objectfiles, targetfile, opt) opt = table.copy(opt) opt.target = self:target() - if self:_targetkind() == "shared" and self:target():implibdir() then - opt.implibdir = self:target():implibdir() + if self:target():type() == "target" then + local implibdir = self:target():implibdir() + if implibdir then + opt.implibdir = implibdir + end end profiler:enter(self:name(), "link", targetfile) |
