Skip to content

Commit

Permalink
improve links
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Oct 23, 2023
1 parent 788d4e5 commit ecae2ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xmake/modules/core/tools/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ end

-- make the link flag
function nf_link(self, lib)
if lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then
if self:is_plat("linux") and (lib:endswith(".a") or lib:endswith(".so")) and not lib:find(path.sep(), 1, true) then
return "-l:" .. lib
elseif lib:endswith(".a") or lib:endswith(".so") or lib:endswith(".dylib") or lib:endswith(".lib") then
return lib
else
return "-l" .. lib
Expand Down

0 comments on commit ecae2ad

Please sign in to comment.