1
Fork 0

Add suggestion to the "missing native library" error

If we fail to locate a native library that we are linking with, it could
be the case the user entered a complete file name like `foo.lib` or
`libfoo.a` when we expect them to simply provide `foo`.

In this situation, we now detect that case and suggest the user only
provide the library name itself.
This commit is contained in:
Wesley Wiser 2022-10-12 22:52:31 -04:00
parent 0938e1680d
commit 097b6d3baf
7 changed files with 68 additions and 2 deletions

View file

@ -52,7 +52,7 @@ pub fn find_native_static_library(
}
}
sess.emit_fatal(MissingNativeLibrary { libname: name });
sess.emit_fatal(MissingNativeLibrary::new(name, verbatim.unwrap_or(false)));
}
fn find_bundled_library(