summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/nvcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/nvcc.lua')
-rw-r--r--xmake/modules/core/tools/nvcc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index dbbf5476d..8e64b6704 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -134,12 +134,12 @@ end
-- make the rpathdir flag
function nf_rpathdir(self, dir)
- if self:has_flags("-Wl,-rpath=" .. dir) then
+ if self:has_flags("-Wl,-rpath=" .. dir, "ldflags") then
return "-Wl,-rpath=" .. os.args(dir:gsub("@[%w_]+", function (name)
local maps = {["@loader_path"] = "$ORIGIN", ["@executable_path"] = "$ORIGIN"}
return maps[name]
end))
- elseif self:has_flags("-Xlinker -rpath -Xlinker " .. dir) then
+ elseif self:has_flags("-Xlinker -rpath -Xlinker " .. dir, "ldflags") then
return "-Xlinker -rpath -Xlinker " .. os.args(dir:gsub("%$ORIGIN", "@loader_path"))
end
end