summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2024-08-23 00:55:02 +0800
committerruki <[email protected]>2024-08-23 00:55:02 +0800
commit08eac4b65a1e171bd3f2cc22b66923bb4c1933ee (patch)
treecef30aa84bdc0d2240ec6e25299630c600b6985e /xmake/modules
parent7f4a28767f1a2e9a9139a58e176c5032d157f032 (diff)
fix rpath for #pull/5466
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/target/action/install/main.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/target/action/install/main.lua b/xmake/modules/target/action/install/main.lua
index 6eecfaba4..228cabd1a 100644
--- a/xmake/modules/target/action/install/main.lua
+++ b/xmake/modules/target/action/install/main.lua
@@ -158,7 +158,6 @@ function _update_install_rpath(target, opt)
local bindir = target:bindir()
local targetfile = path.join(bindir, target:filename())
if target:policy("install.rpath") then
- rpath_utils.clean(targetfile, {plat = target:plat(), arch = target:arch()})
local result, sources = target:get_from("rpathdirs", "*")
if result and sources then
for idx, rpathdirs in ipairs(result) do
@@ -169,6 +168,8 @@ function _update_install_rpath(target, opt)
local extra = extraconf[rpathdir]
if extra and extra.installonly then
rpath_utils.insert(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
+ else
+ rpath_utils.remove(targetfile, rpathdir, {plat = target:plat(), arch = target:arch()})
end
end
end