summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/nvcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-20 23:55:49 +0800
committerruki <[email protected]>2018-12-20 17:34:56 +0800
commitd95758dc85e1e34e6ce507ffee78f7634a0661c5 (patch)
treef740966dedf5eea54bf54c4f7d379fcfa012034a /xmake/modules/core/tools/nvcc.lua
parentcbce3651b8baff9d4cad89b3056e629c9ace4a41 (diff)
add flagkind to has_flags
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