Skip to content

Commit 08eac4b

Browse files
committed
fix rpath for #pull/5466
1 parent 7f4a287 commit 08eac4b

File tree

1 file changed

+2
-1
lines changed
  • xmake/modules/target/action/install

1 file changed

+2
-1
lines changed

xmake/modules/target/action/install/main.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ function _update_install_rpath(target, opt)
158158
local bindir = target:bindir()
159159
local targetfile = path.join(bindir, target:filename())
160160
if target:policy("install.rpath") then
161-
rpath_utils.clean(targetfile, {plat = target:plat(), arch = target:arch()})
162161
local result, sources = target:get_from("rpathdirs", "*")
163162
if result and sources then
164163
for idx, rpathdirs in ipairs(result) do
@@ -169,6 +168,8 @@ function _update_install_rpath(target, opt)
169168
local extra = extraconf[rpathdir]
170169
if extra and extra.installonly then
171170
rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
171+
else
172+
rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
172173
end
173174
end
174175
end

0 commit comments

Comments
 (0)