Skip to content

Commit 252b7e5

Browse files
committed
make rpathdir clang function private
1 parent 4f712db commit 252b7e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

xmake/modules/core/tools/clang.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function _get_llvm_target_triple(self)
221221
end
222222

223223
-- make the rpathdir flag
224-
function rpathdir(self, dir)
224+
function _rpathdir(self, dir)
225225
dir = path.translate(dir)
226226
if self:has_flags("-Wl,-rpath=" .. dir, "ldflags") then
227227
local flags = {"-Wl,-rpath=" .. (dir:gsub("@[%w_]+", function (name)
@@ -309,13 +309,13 @@ function nf_runtime(self, runtime, opt)
309309
maps["c++_shared"] = table.join(maps["c++_shared"], "-L" .. triple_libdir)
310310
end
311311
-- add rpath to avoid the user need to set LD_LIBRARY_PATH by hand
312-
maps["c++_shared"] = table.join(maps["c++_shared"], rpathdir(self, libdir))
312+
maps["c++_shared"] = table.join(maps["c++_shared"], _rpathdir(self, libdir))
313313
if triple_libdir then
314-
maps["c++_shared"] = table.join(maps["c++_shared"], rpathdir(self, triple_libdir))
314+
maps["c++_shared"] = table.join(maps["c++_shared"], _rpathdir(self, triple_libdir))
315315
end
316316
if target:kind() == "shared" and self:is_plat("macosx", "iphoneos", "watchos") then
317-
table.join2(maps["c++_shared"], "-install_name")
318-
table.join2(maps["c++_shared"], "@rpath/" .. path.filename(target:filename()))
317+
maps["c++_shared"] = table.join(maps["c++_shared"], "-install_name")
318+
maps["c++_shared"] = table.join(maps["c++_shared"], "@rpath/" .. path.filename(target:filename()))
319319
end
320320
end
321321
if runtime:endswith("_static") and _has_static_libstdcxx(self) then

0 commit comments

Comments
 (0)