summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2025-12-01 12:53:32 +0800
committerOpportunityLiu <[email protected]>2025-12-01 12:53:32 +0800
commitcd16881d0b2295c5585adc25785c75a8a62dc50a (patch)
tree8e83f6d859a2ece92f0aea85204c8fe49231fbea
parent35502fa3b332a70811baf75fc91c3daa49380eb5 (diff)
fix check clang cuda flags, Fixes #7077
-rw-r--r--xmake/modules/core/tools/gcc/has_flags.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc/has_flags.lua b/xmake/modules/core/tools/gcc/has_flags.lua
index b9e37f5ae..c743f91fb 100644
--- a/xmake/modules/core/tools/gcc/has_flags.lua
+++ b/xmake/modules/core/tools/gcc/has_flags.lua
@@ -124,7 +124,7 @@ function _check_try_running(flags, opt, islinker)
local args = table.join(flags, "-c", "-o", tmpfile, sourcefile)
if not cuda_gpu_flags then
local cuda = get_config("cuda")
- local cuda_sdk = find_cuda(cuda and cuda or nil)
+ local cuda_sdk = find_cuda(cuda)
local cuda_sdkver = cuda_sdk and cuda_sdk.sdkver or "7.0"
if cuda_sdkver and semver.compare(cuda_sdkver, "12.0") >= 0 then
table.insert(args, 1, "--cuda-gpu-arch=sm_80")