Skip to content

cuda: support download toolchains #7459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2025
Merged

cuda: support download toolchains #7459

merged 2 commits into from
Jun 23, 2025

Conversation

star-hengxing
Copy link
Contributor

close #7179

@star-hengxing star-hengxing marked this pull request as ready for review June 21, 2025 09:39
@star-hengxing star-hengxing requested a review from xq114 June 21, 2025 12:46

if package:is_plat("windows") then
local z7 = assert(find_tool("7z"), "7z tool not found!")
os.vrunv(z7.program, {"x", "-y", package:originfile()})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

尽管 xmake 内置了 7z,不过既然包里面用,还是走 add_deps + 直接调用会更好吧。毕竟也有不通过安装包,直接用的 xmake bundle ,那个是不带 7z 的

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

测试了一下,目前就自动带上,不需要 add_deps

  => install 7z 19.00 .. ok
checking for 7z ... C:\Users\star\AppData\Local\.xmake\packages\7\7z\19.00\5d9443e8176e475d9915057113db5607\bin\7z.exe

https://github.com/xmake-io/xmake/blob/c78f1d8a874aa899387e8ab959932cc8b9de33aa/xmake/modules/private/action/require/impl/environment.lua#L48

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我知道,这就是我上面说的。如果用户用 xmake installer 安装的,会自带 7z ,走这里的 envs 就能自动找到。

但是也有用户会走 scoop, xmake zip 包,以及 bundle 包直接调用 xmake 命令。这几种情况下, xmake 是不会自带 7z 的。 如果不加 add_deps 是不会找到 7z 的。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没理解,我这里测试就是模拟了没自带 7z 的

xmake f -c -v
checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.44.35211
checking for nim ... no
checking for nim ... no
checking for git ... C:\Users\star\scoop\shims\git.exe
checking for gzip ... no
checking for 7z ... no
checking for 7za ... no
C:\Users\star\scoop\shims\git.exe rev-parse HEAD
checking for 7z ... no
checking for 7za ... no
checking for 7z ... no
checking for 7za ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
  -> 7z 19.00 [host]
please input: y (y/n/m)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哦,忘记了,xmake 内置会去安装 7z 那没事了

@waruqi waruqi merged commit 8e47955 into dev Jun 23, 2025
73 checks passed
@waruqi waruqi deleted the cuda branch June 23, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support download cuda-toolkit for cuda package
2 participants