summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/binary/rpath.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-19 23:59:04 +0800
committerruki <[email protected]>2025-12-19 23:59:04 +0800
commitb6f59585662d051459b6660d397a9b41941738da (patch)
tree1b362ffdbff61bb01bda8260f117799c22144472 /xmake/modules/utils/binary/rpath.lua
parentdee8082d12241d69cf370c7f566c48c0ca8827bd (diff)
improve rpath
Diffstat (limited to 'xmake/modules/utils/binary/rpath.lua')
-rw-r--r--xmake/modules/utils/binary/rpath.lua19
1 files changed, 17 insertions, 2 deletions
diff --git a/xmake/modules/utils/binary/rpath.lua b/xmake/modules/utils/binary/rpath.lua
index 6152d4d14..fe783751e 100644
--- a/xmake/modules/utils/binary/rpath.lua
+++ b/xmake/modules/utils/binary/rpath.lua
@@ -295,6 +295,18 @@ function _clean_rpath_by_patchelf(binaryfile, opt)
return ok
end
+function _insert_rpath_by_binutils(binaryfile, rpath, opt)
+ return binutils.rpath_insert(binaryfile, rpath)
+end
+
+function _remove_rpath_by_binutils(binaryfile, rpath, opt)
+ return binutils.rpath_remove(binaryfile, rpath)
+end
+
+function _clean_rpath_by_binutils(binaryfile, opt)
+ return binutils.rpath_clean(binaryfile)
+end
+
-- get rpath list
function list(binaryfile, opt)
opt = opt or {}
@@ -319,7 +331,8 @@ end
function insert(binaryfile, rpath, opt)
opt = opt or {}
local ops = {
- _insert_rpath_by_patchelf
+ _insert_rpath_by_patchelf,
+ _insert_rpath_by_binutils
}
if is_host("macosx") then
table.insert(ops, 1, _insert_rpath_by_install_name_tool)
@@ -341,7 +354,8 @@ end
function remove(binaryfile, rpath, opt)
opt = opt or {}
local ops = {
- _remove_rpath_by_patchelf
+ _remove_rpath_by_patchelf,
+ _remove_rpath_by_binutils
}
if is_host("macosx") then
table.insert(ops, 1, _remove_rpath_by_install_name_tool)
@@ -395,6 +409,7 @@ function clean(binaryfile, opt)
opt = opt or {}
local ops = {
_clean_rpath_by_patchelf,
+ _clean_rpath_by_binutils,
_clean_rpath_by_generic
}
local done = false