summaryrefslogtreecommitdiff
path: root/xmake/platforms/linux/load.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-03-10 00:06:11 +0800
committerruki <[email protected]>2018-03-09 18:37:07 +0800
commitcdd169fc777c6cd2c0335969d02064844aa104bc (patch)
tree9138e1c85ecb112d5e914cddd332ab8637eef824 /xmake/platforms/linux/load.lua
parent1fe2e277250905bec5731912f8baac3a5cff40b0 (diff)
fix compiler errors for linux cuda
Diffstat (limited to 'xmake/platforms/linux/load.lua')
-rw-r--r--xmake/platforms/linux/load.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/platforms/linux/load.lua b/xmake/platforms/linux/load.lua
index 74ebe5640..5f519c100 100644
--- a/xmake/platforms/linux/load.lua
+++ b/xmake/platforms/linux/load.lua
@@ -76,7 +76,7 @@ function main()
_g["rc-ldflags"] = {}
-- init flags for cuda
- local cu_archs = { i386 = "-m32 -Xcompiler -arch -Xcompiler -m32", x86_64 = "-m64 -Xcompiler -arch -Xcompiler -m64" }
+ local cu_archs = { i386 = "-m32 -Xcompiler -m32", x86_64 = "-m64 -Xcompiler -m64" }
_g.cuflags = {cu_archs[arch] or ""}
_g["cu-shflags"] = {cu_archs[arch] or ""}
_g["cu-ldflags"] = {cu_archs[arch] or ""}
@@ -85,7 +85,7 @@ function main()
table.insert(_g.cuflags, "-I" .. os.args(path.join(cuda_dir, "include")))
table.insert(_g["cu-ldflags"], "-L" .. os.args(path.join(cuda_dir, "lib")))
table.insert(_g["cu-shflags"], "-L" .. os.args(path.join(cuda_dir, "lib")))
- table.insert(_g["cu-ldflags"], "-Wl,-rpath=" .. os.args(path.join(cuda_dir, "lib")))
+ table.insert(_g["cu-ldflags"], "-Xlinker -rpath=" .. os.args(path.join(cuda_dir, "lib")))
end
-- ok