Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Provide working usage instructions for rls-rustc #10

Open
staktrace opened this issue Jul 24, 2018 · 1 comment
Open

Provide working usage instructions for rls-rustc #10

staktrace opened this issue Jul 24, 2018 · 1 comment

Comments

@staktrace
Copy link

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).

@nrc
Copy link
Member

nrc commented Jul 24, 2018

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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants