Handling Cargo Configurations like RUSTDOC
.
#871
Alexhuszagh
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The following environment variables used to configure
cargo
aren't trivial to support: they're slightly more complex than just passing them through to the docker container:For example,
RUSTC
is an executable, which should be just a different binary to execute.RUSTC_WRAPPER
callsRUSTC
orrustc
, but might be a script or another wrapper (such assccache
aroundrustc
). There's also the issue of host/container architecture/OS mismatch. Our containers assumex86_64-unknown-linux-gnu
, but our hosts might be much different.We've got a few options:
RUSTC
, and then only to get the sysroot (it is not passed to the container). Print a warning if any of these environment variables are set.RUSTC
to be used for the host except onx86_64-unknown-linux-gnu
, and print a warning if the host is notx86_64-unknown-linux-gnu
.Option 1
Print a warning similar to the following:
$ RUSTC=/path/to/rustc cross build ... Warning: cross does not support the `RUSTC` environment variable: it will be ignored.
Option 2
Mount the parent directory containg
RUSTC
, for example, and then if the host is notx86_64-unknown-linux-gnu
, print:This might also not work if the script uses data or wraps another executable found outside the directory containing it. There really isn't a good way to handle that, however.
Option 3
Do nothing, keep the current behavior.
Beta Was this translation helpful? Give feedback.
All reactions