Auto merge of #44279 - smaeul:crt_static-deps, r=alexcrichton
Require rlibs for dependent crates when linking static executables This handles the case for `CrateTypeExecutable` and `+crt_static`. I reworked the match block to avoid duplicating the `attempt_static` and error checking code again (this case would have been a copy of the `CrateTypeCdylib`/`CrateTypeStaticlib` case). On `linux-musl` targets where `std` was built with `crt_static = false` in `config.toml`, this change brings the test suite from entirely failing to mostly passing. This change should not affect behavior for other crate types, or for targets which do not respect `+crt_static`.
This commit is contained in:
commit
6c476ce462
3 changed files with 53 additions and 45 deletions
|
|
@ -8,7 +8,7 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// error-pattern: dependency `cdylib_dep` not found in rlib format
|
||||
// error-pattern: crate `cdylib_dep` required to be available in rlib format, but was not found
|
||||
// aux-build:cdylib-dep.rs
|
||||
// ignore-musl
|
||||
// ignore-emscripten
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// aux-build:rmeta_meta.rs
|
||||
// no-prefer-dynamic
|
||||
// error-pattern: crate `rmeta_meta` required to be available in rlib, but it was not available
|
||||
// error-pattern: crate `rmeta_meta` required to be available in rlib format, but was not found
|
||||
|
||||
// Check that building a non-metadata crate fails if a dependent crate is
|
||||
// metadata-only.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue