dylint icon indicating copy to clipboard operation
dylint copied to clipboard

`cargo dylint` is confused by explicit build target

Open ilammy opened this issue 1 month ago • 2 comments

If the target triple is explicitly set (via CARGO_BUILD_TARGET environmenet variable or build.target configuration), cargo dylint fails to locate all sorts of things after successful compilation: the lint libraries, the driver, and so on.

That's because the setting causes Cargo to add an extra subdirectory for the build target, while cargo dylint adds its own hierarchy (and pretty much expects to always compile for the host).

Since it's nice when things just work™, I think the expected behavior would be to respect the build target, pick up the binaries from resulting different location, and assume that if the configuration is set then the produced binaries are directly executable/loadable.

ilammy avatar Jan 03 '26 01:01 ilammy