-
Notifications
You must be signed in to change notification settings - Fork 381
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
-Zbuild-std
is appended in the wrong position
#1141
Comments
Related to #1049. We can probably have an |
This should be closed in #1142, if you'd like to test to ensure it works that would be wonderful. The above example now works for me: $ cross -v +nightly clippy --target x86_64-unknown-dragonfly -- -D warnings
+ cargo +nightly metadata --format-version 1 --filter-platform x86_64-unknown-dragonfly
+ rustc --print sysroot
+ /usr/bin/docker
+ /usr/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
+ rustup toolchain list
+ rustup target list --toolchain nightly-x86_64-unknown-linux-gnu
[cross] warning: using newer rustc `1.67.0-nightly (6284998a2 2022-11-12)` for the target. Current active rustc on the host is `rustc 1.62.0 (a8314ef7d 2022-06-27)`.
> Update with `rustup update`
+ rustup component list --toolchain nightly-x86_64-unknown-linux-gnu
+ rustup component list --toolchain nightly-x86_64-unknown-linux-gnu
+ /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/home/ahuszagh/.xargo' -e 'CARGO_HOME=/home/ahuszagh/.cargo' -e 'CROSS_RUST_SYSROOT=/home/ahuszagh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=ahuszagh' -e 'CROSS_RUSTC_MAJOR_VERSION=1' -e 'CROSS_RUSTC_MINOR_VERSION=67' -e 'CROSS_RUSTC_PATCH_VERSION=0' --name cross-nightly-x86_64-unknown-linux-gnu-de1a6-6284998a2-x86_64-unknown-dragonfly-2a8a9-1668878982010 --rm --user 1000:1000 -v /home/ahuszagh/.xargo:/home/ahuszagh/.xargo:z -v /home/ahuszagh/.cargo:/home/ahuszagh/.cargo:z -v /home/ahuszagh/.cargo/bin -v /home/ahuszagh/Desktop/cross/hello:/home/ahuszagh/Desktop/cross/hello:z -v /home/ahuszagh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/home/ahuszagh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:z,ro -v /home/ahuszagh/Desktop/cross/hello/target:/target:z -w /home/ahuszagh/Desktop/cross/hello -t ghcr.io/cross-rs/x86_64-unknown-dragonfly:main sh -c 'PATH="$PATH":"/home/ahuszagh/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin" cargo -v clippy --target x86_64-unknown-dragonfly -Zbuild-std -- -D warnings'
Finished dev [unoptimized + debuginfo] target(s) in 0.16 So, the invoked command inside the container is now |
That was fast! And yeah, it worked perfectly for me as well. Thank you! One question, is my second example incorrect? Because
Still fails...🤔 |
Yes it is invalid, I believe. |
Makes sense! Thanks again. |
Checklist
Describe your issue
Trying to pass extra arguments to
clippy
on a target with nostd
(x86_64-unknown-dragonfly
, in my case), fails:I believe the issue is caused due to cross passing
-Zbuild-std
toclippy
instead ofcargo
.My
Cross.toml
:I've also tried without using
Cross.toml
, i.e. by settingRUSTFLAGS=-Zbuild-std
manually, but I think I confused cross even further?What target(s) are you cross-compiling for?
other (specify in description)
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.4 (6635e20 2022-11-16)
Example
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: