summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/binary
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-19 13:48:46 +0800
committerGitHub <[email protected]>2025-12-19 13:48:46 +0800
commit5df20ea1dafb3c19e95b8bcd2df6cbbbf03fde81 (patch)
treed7554bec8522d1be9eb6e7e45953b1d8010bf522 /xmake/modules/utils/binary
parentbbe585b9b8927d71f79f8c723110224e31348381 (diff)
parent68be1c62a74322993a6b21f74476a716cb3a6963 (diff)
Merge pull request #7149 from xmake-io/rpath
Add rpath in binutils
Diffstat (limited to 'xmake/modules/utils/binary')
-rw-r--r--xmake/modules/utils/binary/rpath.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/utils/binary/rpath.lua b/xmake/modules/utils/binary/rpath.lua
index 271ef8939..6152d4d14 100644
--- a/xmake/modules/utils/binary/rpath.lua
+++ b/xmake/modules/utils/binary/rpath.lua
@@ -20,6 +20,7 @@
-- imports
import("core.base.option")
+import("core.base.binutils")
import("lib.detect.find_tool")
function _replace_rpath_vars(rpath, opt)
@@ -34,6 +35,10 @@ function _replace_rpath_vars(rpath, opt)
return rpath
end
+function _get_rpath_list_by_binutils(binaryfile, opt)
+ return binutils.rpath_list(binaryfile)
+end
+
function _get_rpath_list_by_objdump(binaryfile, opt)
local list
local plat = opt.plat or os.host()
@@ -296,7 +301,8 @@ function list(binaryfile, opt)
local ops = {
_get_rpath_list_by_objdump,
_get_rpath_list_by_readelf,
- _get_rpath_list_by_patchelf
+ _get_rpath_list_by_patchelf,
+ _get_rpath_list_by_binutils
}
if is_host("macosx") then
table.insert(ops, 1, _get_rpath_list_by_otool)