Skip to content

Clippy built from sources couldn't find codegen directory #3565

Closed
@o01eg

Description

@o01eg

While looking for other #2874 solutions found another bug. Compiled with rustc clippy correctly finds codegen folder while built from sources doesn't:

$ RUST_LOG=debug rustc src/driver.rs
...
 INFO 2018-12-19T20:37:40Z: rustc_driver: codegen backend candidate: /usr/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends
 INFO 2018-12-19T20:37:40Z: rustc_driver: probing /usr/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends for a codegen backend
...
$ RUST_LOG=debug clippy-driver src/driver.rs
...
 INFO 2018-12-19T20:37:04Z: rustc_driver: codegen backend candidate: /usr/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends
 INFO 2018-12-19T20:37:04Z: rustc_driver: probing /usr/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends for a codegen backend
...
$ RUST_LOG=debug ./target/release/clippy-driver src/driver.rs
...
 INFO 2018-12-19T20:36:27Z: rustc_driver: codegen backend candidate: /tmp/rust-clippy/target/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends
 INFO 2018-12-19T20:36:27Z: rustc_driver: codegen backend candidate: /usr/lib64/lib64/rust-9999/rustlib/x86_64-unknown-linux-gnu/codegen-backends
...

rustc config.toml:

[llvm]
optimize = true
release-debuginfo = false
assertions = false
targets = "X86;Mips;NVPTX;BPF;AArch64"
[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["x86_64-unknown-linux-gnu"]
docs = false
submodules = false
python = "python2.7"
locked-deps = true
vendor = false
verbose = 2
sanitizers = false
extended = true
tools = ["clippy",]
[install]
prefix = "/usr"
libdir = "lib64/rust-9999"
docdir = "share/doc/rust-9999"
mandir = "share/rust-9999/man"
[rust]
optimize = true
debuginfo = false
debug-assertions = true # false
jemalloc = true
default-linker = "x86_64-pc-linux-gnu-gcc"
rpath = false
ignore-git = false
lld = false
llvm-tools = true
[target.x86_64-unknown-linux-gnu]
cc = "x86_64-pc-linux-gnu-gcc"
cxx = "x86_64-pc-linux-gnu-g++"
linker = "x86_64-pc-linux-gnu-gcc"
ar = "x86_64-pc-linux-gnu-ar"

OS: Gentoo Linux AMD64
Clippy from sources rev: 691e5e7
Rustc rev: rust-lang/rust@e7b4bc3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions