Skip to content

Usage of LLVM_DWP_EXECUTABLE doesn't play nicely with --out-dir #85471

Closed

Description

$ rustc --version
rustc 1.52.1
$ rm -f hello hello.dwp; RUSTC_BOOTSTRAP=1 rustc hello.rs -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 
$ ls -gG hello hello.dwp 
-rwxr-xr-x 1 10792848 May 19 15:31 hello*
-rw-r--r-- 1    33864 May 19 15:31 hello.dwp

Ok, that worked. But adding --out-dir $PWD makes it fail:

$ rust-llvm-dwp --version
LLVM (http://llvm.org/):
  LLVM version 11.0.1
  
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: skylake
$ rm -f hello hello.dwp; RUSTC_BOOTSTRAP=1 rustc hello.rs -Z unstable-options -C split-debuginfo=packed -C debuginfo=2 --out-dir $PWD
error: linking dwarf objects with `rust-llvm-dwp` failed: exit code: 1
  |
  = note: "rust-llvm-dwp" "-e" "/home/infinity0/var/lib/rust/hello" "-o" "/home/infinity0/var/lib/rust/hello.dwp"
  = note: 
  = note: error: No such file or directory
          

error: aborting due to previous error

$ echo $?
0
# furthermore, the exit code from rustc is 0
$ ls -gG hello hello.dwp 
ls: cannot access 'hello.dwp': No such file or directory
-rwxr-xr-x 1 10793312 May 19 15:31 hello*
exit code 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions