diff options
Diffstat (limited to 'xmake/modules/utils/binary/rpath.lua')
| -rw-r--r-- | xmake/modules/utils/binary/rpath.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/modules/utils/binary/rpath.lua b/xmake/modules/utils/binary/rpath.lua index 7af3f679e..fcecb2b06 100644 --- a/xmake/modules/utils/binary/rpath.lua +++ b/xmake/modules/utils/binary/rpath.lua @@ -319,11 +319,16 @@ function insert(binaryfile, rpath, opt) table.insert(ops, 1, _insert_rpath_by_install_name_tool) end rpath = _replace_rpath_vars(rpath, opt) + local done = false for _, op in ipairs(ops) do if op(binaryfile, rpath, opt) then + done = true break end end + if not done then + wprint("cannot insert rpath to %s, no rpath utility available, maybe we need to install patchelf", binaryfile) + end end -- remove rpath @@ -360,11 +365,16 @@ function change(binaryfile, rpath_old, rpath_new, opt) end rpath_old = _replace_rpath_vars(rpath_old, opt) rpath_new = _replace_rpath_vars(rpath_new, opt) + local done = false for _, op in ipairs(ops) do if op(binaryfile, rpath_old, rpath_new, opt) then + done = true break end end + if not done then + wprint("cannot change rpath to %s, no rpath utility available, maybe we need to install patchelf", binaryfile) + end end -- clean rpath @@ -381,9 +391,14 @@ function clean(binaryfile, opt) _clean_rpath_by_patchelf, _clean_rpath_by_generic } + local done = false for _, op in ipairs(ops) do if op(binaryfile, opt) then + done = true break end end + if not done then + wprint("cannot clean rpath %s, no rpath utility available, maybe we need to install patchelf", binaryfile) + end end |
