Skip to content

Commit

Permalink
improve rpath
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jul 26, 2024
1 parent db6f72c commit d860777
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xmake/modules/core/tools/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ end
-- make the rpathdir flag
function nf_rpathdir(self, dir, opt)
opt = opt or {}
local extra = opt.extra
if extra and extra.installonly then
return
end
dir = path.translate(dir)
if self:has_flags("-Wl,-rpath=" .. dir, "ldflags") then
local flags = {"-Wl,-rpath=" .. (dir:gsub("@[%w_]+", function (name)
Expand All @@ -395,7 +399,6 @@ function nf_rpathdir(self, dir, opt)
end))}
-- add_rpathdirs("...", {runpath = false})
-- https://github.com/xmake-io/xmake/issues/5109
local extra = opt.extra
if extra then
if extra.runpath == false and self:has_flags("-Wl,-rpath=" .. dir .. ",--disable-new-dtags", "ldflags") then
flags[1] = flags[1] .. ",--disable-new-dtags"
Expand Down

0 comments on commit d860777

Please sign in to comment.