backtrace-rs
backtrace-rs copied to clipboard
build.rs: canonicalize OUT_DIR
Hi, I discovered a build problem when building this crate with the Bazel build system for the Android platform.
This warning occurs:
Build Script Warning: clang: error: no such file or directory: 'external/crate_index__backtrace-0.3.69/src/android-api.c'
Build Script Warning: clang: error: no input files
The problem is due to the fact that OUT_DIR
is a relative path, and it looks like cc::Build:: ... .try_expand()
expects an absolute path. Maybe because it's running inside a temporary dir ? I didn't dig enough to know.
I can confirm that canonicalizing the OUT_DIR fixes my problem.
@TheLortex I do not think we should modify this code unless https://github.com/rust-lang/rust/pull/120593 fails to go through in a reasonable timeframe (say, next few weeks), because I would prefer the next modification to this file to not be an error correction but a deletion.