Open samsartor opened 4 years ago
Figured out the difference! "-C extra-filename=..." won't be passed if in my Cargo.toml I have:
[lib]
crate-type = ["cdylib", "rlib"]
Unfortunately if I remove that section, I then get error: crate [dependency] required to be available in rlib format, but was not found in this form
for some of my dependencies.
Cargo yelling about crate [dependency] required to be available in rlib format, but was not found in this form
turned out to be a bug that I can fix by setting set_var("CARGO_BUILD_PIPELINING", "false")
in my build.rs
.
I'm not sure if you want to handle the "crate-type" case gracefully or not so I'll leave the bug open. But if you decide it is not a problem, you can close it. I have my workaround!
ptx-builder is failing with "Unable to find
extra-filename
rustc flag" when I am building my project. When I runcargo rustc --target nvptx64-nvidia-cuda -v ..
myself I get:The same happens whether or not I include "rlib" as an additional crate type.
Interestingly, all my dependencies'
rustc
invokations appear to be getting the "extra-filename" param. It is just the final invocation (the one ptx-builder actually cares about) which is missing extra-filename.If needed, I can take the time to create a minimal repro for you. But I'm guessing it is simply a problem with a newer cargo version which doesn't pass the argument.
I'm running: