Closed
Description
Currently, paths::target_dir()
tries to find the target
directory by looking at the name.
This has two problems:
- The user might have specified a different target directory by using the Cargo config option
target-dir
(https://doc.rust-lang.org/cargo/reference/config.html) - The target directory might be called target, but actually be a symlink to something else that isn't called
target
- andcanonicalize
resolves symlinks.
In both cases, paths::target_dir()
fails.
What is the rationale for not putting all the generated code etc. in the OUT_DIR or a subdirectory thereof directly? If the latter is acceptable, I'm happy to submit a pull request changing the behavior...
Activity