diff options
| author | ruki <[email protected]> | 2024-07-11 07:33:24 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-07-11 07:33:24 +0800 |
| commit | c90b483177dd45fb6e7a546b73fcd17c32bbaf23 (patch) | |
| tree | 82b70bfcea8e214745f9e4d2df10ee80e3154916 | |
| parent | ff1692e1c69914ad794e793dfbee97e369cdfb55 (diff) | |
| parent | 8f43e8a5e557b82d690aba161fa6e109af5cd7cf (diff) | |
Merge pull request #5319 from xmake-io/cuda
improve to find cuda for linux arm64 #5317
| -rw-r--r-- | core/src/xmake/engine.c | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/sdks/find_cuda.lua | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index b63dcf42b..6ca1d0899 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -960,6 +960,8 @@ static __tb_inline__ tb_char_t const* xm_engine_xmake_arch() arch = "x86_64"; #elif defined(TB_ARCH_x86) arch = "i386"; +#elif defined(TB_ARCH_ARM64) + arch = "arm64"; #else arch = TB_ARCH_STRING; #endif diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua index 302b6ade0..6dc9f19d0 100644 --- a/xmake/modules/detect/sdks/find_cuda.lua +++ b/xmake/modules/detect/sdks/find_cuda.lua @@ -105,7 +105,7 @@ function _find_cuda(sdkdir) if is_host("windows") then local subdir = is_arch("x64") and "x64" or "Win32" table.insert(linkdirs, path.join(sdkdir, "lib", subdir)) - elseif is_host("linux") and is_arch("x86_64") then + elseif is_host("linux") and is_arch("x86_64", "arm64") then table.insert(linkdirs, path.join(sdkdir, "lib64")) else table.insert(linkdirs, path.join(sdkdir, "lib")) |
