Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Provide working usage instructions for rls-rustc #1337

Open
Xanewok opened this issue Feb 25, 2019 · 1 comment
Open

Provide working usage instructions for rls-rustc #1337

Xanewok opened this issue Feb 25, 2019 · 1 comment

Comments

@Xanewok
Copy link
Member

Xanewok commented Feb 25, 2019

Originally created by @staktrace (rust-dev-tools/rls-rustc#10):

I tried to use this shim, but it didn't work. Maybe I'm doing it wrong? I built it and then tried to use the generated rustc shim as a drop-in replacement for rustc to build it again.

$ cargo +nightly build --release
$ mv target target.old
$ RUSTC_WRAPPER=target.old/release/rustc cargo +nightly build
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/Users/kats/zspace/rls-rustc/target.old/release/rustc rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 101)
--- stderr
error: multiple input filenames provided

Also I get a different error if I run that last step without +nightly:

$ RUSTC_WRAPPER=target.old/release/rustc cargo build
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/Users/kats/zspace/rls-rustc/target.old/release/rustc rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (signal: 6, SIGABRT: process abort signal)
--- stderr
dyld: Library not loaded: @rpath/librustc_driver-51f1276ab2f3d846.dylib
  Referenced from: /Users/kats/zspace/rls-rustc/target.old/release/rustc
  Reason: image not found

I get the same errors when trying to use the shim to build other rust crates (ones that build fine with release-version rust).

@Xanewok
Copy link
Member Author

Xanewok commented Feb 25, 2019

Originally replied by @nrc (rust-dev-tools/rls-rustc#10 (comment)):

Hmm, I'm not sure I've ever tried using this with Cargo, only directly (see the usage in the RLS for an example). I'm not sure what is going wrong. Agree we need better docs!

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

No branches or pull requests

1 participant