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

Add --toolchain_host= argument #5639

Closed
xq114 opened this issue Sep 19, 2024 · 7 comments
Closed

Add --toolchain_host= argument #5639

xq114 opened this issue Sep 19, 2024 · 7 comments
Labels
Milestone

Comments

@xq114
Copy link
Contributor

xq114 commented Sep 19, 2024

Xmake 版本

2.9.5

操作系统版本和架构

Ubuntu

描述问题

xmake-io/xmake-repo#5269

这边cross build使用的python指定了 add_deps("libffi", {host = true}) 但安装libffi的时候还是使用了cross toolchain导致安装失败

期待的结果

host = true 应该忽略toolchain指定,使用host toolchain

最好可以在global setting里指定默认toolchain,这样也有办法控制这些host package的安装使用哪个toolchain了

工程配置

/

附加信息和错误日志

/

@xq114 xq114 added the bug label Sep 19, 2024
@waruqi
Copy link
Member

waruqi commented Sep 20, 2024

这是由于目前全局 platform 没有区分 host/build toolchain,仅仅 package 里面有这个概念。。

所以 package 本身还是 host 编译,但是 on_test 时候,走了 platform toolchain 去测试,被 xmake f --toolchain=muslcc 给影响到了。。

这种要么类似 conna 那样, xmake f --toolchain_host=xmake f --toolchain_build= 区分下。。而 xmake f --toolchain= 为了向下兼容,同时切 build/host toolchain

@xq114
Copy link
Contributor Author

xq114 commented Sep 20, 2024

对交叉编译才需要额外的toolchain_host吧,toolchain_build这个名字不太必要,就用原来的--toolchain就好,没指定toolchain_host就用默认toolchain

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


An additional toolchain_host is only needed for cross-compilation. The name toolchain_build is not necessary. Just use the original --toolchain. If toolchain_host is not specified, use the default toolchain.

@xq114
Copy link
Contributor Author

xq114 commented Sep 20, 2024

需要toolchain_host的地方toolchain_host和toolchain_build必定不一样,同时切 build/host toolchain 是不对的

@waruqi waruqi changed the title packages with {host = true} should ignore toolchain setting Add --toolchain_host= argument Sep 20, 2024
waruqi added a commit that referenced this issue Sep 20, 2024
waruqi added a commit that referenced this issue Sep 23, 2024
@waruqi
Copy link
Member

waruqi commented Sep 23, 2024

试下这个 patch ,改动点比较多,尽可能多测下

#5643

libomp 的那个问题,应该可以解决,另外,binary/toolchain 包内部依赖,不再需要手动挨个配置 {host = true} 了。

@waruqi waruqi added this to the v2.9.6 milestone Sep 23, 2024
waruqi added a commit that referenced this issue Sep 25, 2024
@waruqi
Copy link
Member

waruqi commented Sep 25, 2024

应该可以了

@waruqi waruqi closed this as completed Sep 25, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It should be fine

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

No branches or pull requests

3 participants