Skip to content
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

对 headeronly 的包,传递 toolchains 给其依赖 #2688

Closed
cyfdecyf opened this issue Aug 18, 2022 · 9 comments
Closed

对 headeronly 的包,传递 toolchains 给其依赖 #2688

cyfdecyf opened this issue Aug 18, 2022 · 9 comments

Comments

@cyfdecyf
Copy link
Contributor

你在什么场景下需要该功能?

使用 xmake dev branch commit 365f650 验证过目前最新版的行为。

cppzmq 是一个 headeronly library,但其依赖 zeromq 并不是 headeronly 的。
执行如下命令:

xrepo install --toolchain=gcc-9 zeromq
xrepo install --toolchain=gcc-9 cppzmq

第二条命令,由于 toolchain 选项并未传递给 zeromq,因此还是会重新编译 zeromq。

描述可能的解决方案

对于依赖的包,如果不是 headeronly 则传递 toolchain 选项。

描述你认为的候选方案

目前我的 workaround 是将 cppzmq 的 headeronly 选项移除,缺点是每个 toolchain 都会单独安装一份 cppzmq。

其他信息

No response

@waruqi
Copy link
Member

waruqi commented Aug 18, 2022

这是由于目前 headeronly 会直接跳过 toolchains 配置,避免 headeronly 库重装,但是里面的 deps 目前走的继承 configs 模式,也就一并跳过了。。

回头我看看 有没有办法改进下。

@waruqi waruqi transferred this issue from xmake-io/xmake-repo Aug 18, 2022
@waruqi
Copy link
Member

waruqi commented Aug 18, 2022

你试试 dev ,xmake update -s dev

@cyfdecyf
Copy link
Contributor Author

更新后针对 cppzmq 测试已经可以了,赞速度,非常感谢!

@waruqi waruqi reopened this Aug 18, 2022
@waruqi
Copy link
Member

waruqi commented Aug 18, 2022

之前的改动有点问题,我暂时 revert,会在单独的 pr 里面也压测下。。#2690

现在没空细看,回头可能需要改进下。。

@waruqi
Copy link
Member

waruqi commented Aug 18, 2022

应该可以了,你再试试,xmake update -s github:xmake-io/xmake#requires

不过 github ci 失效了,暂时没法测试,所以还不能 merge

@waruqi
Copy link
Member

waruqi commented Aug 19, 2022

合并了,再试下

@cyfdecyf
Copy link
Contributor Author

试了下,似乎不太对,toolchain 参数没有传递下去。

$ xrepo --version
xRepo 2.6.9+dev.3c54402ff/xmake, A cross-platform C/C++ package manager based on Xmake.

$ xrepo install --toolchain=gcc-11 cppzmq
note: install or modify (m) these packages (pass -y to skip confirm)?
in my-xmake-repo:
  -> zeromq 4.3.4 [from:cppzmq]
  -> cppzmq v4.8.1
please input: y (y/n/m)

@waruqi
Copy link
Member

waruqi commented Aug 19, 2022

再试试

@cyfdecyf
Copy link
Contributor Author

能正常传递 toolchain 了,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants