我正在用我的 Rust 版本创建我自己的工具链。我需要它与 iOS 架构进行交叉编译。当尝试设置默认工具链或覆盖当前目录的工具链时,我收到有关工具链名称的错误。以下是我创建这个新工具链所采取的步骤:
-
创建 Rustup 工具链
rustup toolchain link ios $HOME/rustc-ios
-
覆盖当前目录工具链
rustup override set ios
$ rustup show
Default host: x86_64-apple-darwin
error: toolchain 'ios' does not support components
info: caused by: invalid toolchain name: 'ios'
我尝试了其他符合工具链命名约定的名称,但无济于事:
$ rustup toolchain link stable-2016-07-19-x86_64-apple-ios $HOME/rustc-ios
error: invalid custom toolchain name: 'stable-2016-07-19-x86_64-apple-ios'
$ rustup toolchain link stable-x86_64-apple-ios $HOME/rustc-ios
error: invalid custom toolchain name: 'stable-x86_64-apple-ios'
$ rustup toolchain link x86_64-apple-ios $HOME/rustc-ios
[Update]
至于方法#2,当我进行货物构建时,我仍然看到编译器从我为 rustup 工具链安装的目标链接 Arm 库(即我在 /Users/test-user/src 中为#1 安装的目标) /test-rust-lib/target/):
rustc src/lib.rs
--crate-name test-rust-crate
--crate-type staticlib
-g
--cfg
feature=\"no_network\"
--out-dir /Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug
--emit=dep-info,link
--target armv7-apple-ios
-L dependency=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug
-L dependency=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps
--extern serde_json=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/libserde_json-55921106e25a0359.rlib
--extern serde=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/libserde-e281201342afb4d4.rlib
--extern time=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/libtime-750bfdd52feafcb7.rlib
--extern libc=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/liblibc-1f3392fe1afd1313.rlib
--extern murmur3=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/libmurmur3-ab9a44fb20fb9fad.rlib
--extern quick_error=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/libquick_error-729eced693f2612d.rlib
--extern url=/Users/test-user/src/test-rust-lib/target/armv7-apple-ios/debug/deps/liburl-4690728b1e11fab3.rlib
Arm 库不应该从我构建的 rustc 中提取吗?
我怀疑你所看到的行为rustup show
是 rustup 中与该特定命令相关的错误。我有提出问题 https://github.com/rust-lang-nursery/rustup.rs/issues/599去调查它。
当您在配置自定义工具链后尝试使用自定义工具链进行构建时会发生什么rustup link
and rustup override
?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)