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

Provide working usage instructions for rls-rustc #10

@staktrace

Description

@staktrace

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions