-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
rust: fix building in debug mode #63666
Conversation
Could you also mention |
Seems appropriate yeah.
Hmm... If you want backward-compatibility we could set |
Status? |
Oh, was looking for feedback on whether To itemize the concerns I'd like feedback on more specifically before proceeding:
|
|
9115844
to
fff99a5
Compare
Out-of-tree derivations may rely on copying binaries from target/release as part of a custom installPhase, so move CARGO_TARGET_DIR and put a symlink in place just in case.
Global cross variables are available for all phases of a build and are nicer for nix-shell workflows.
fff99a5
to
ecc1a14
Compare
So the thing is we'll presumably need something nixpkgs specific anyway, since the point of
(I'm not going to suggest relative I'm still pretty indecisive about the details but just pushed the following:
|
9d41d94
to
ecc1a14
Compare
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
Enough has changed in the rust build helpers that this is mostly irrelevant now, closing. |
Motivation for this change
#56540 broke a few things regarding rust builds and did not have the intended effect:
--debug
flag tocargo build
$CARGO_TARGET_DIR/debug
, and symlinking/moving$CARGO_TARGET_DIR/x86_64-unknown-linux-gnu/debug
to it, assuming they're redundant?cargo test
from working, the only reason it happens to work now is because this step mangles the release directory, while the defaultcheckPhase
builds tests in debug mode. ChangingbuildType
todebug
or usingcargo test --release
instead will expose the deadlock.releaseDir
for this, anything that hard-codes target/release are messy hm...cc @illegalprime @Ericson2314
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)