rust/src/test/ui/panic-runtime
Alex Crichton 50c57d8c80 rustc: Fix mixing crates with different share_generics
This commit addresses #64319 by removing the `dylib` crate type from the
list of crate type that exports generic symbols. The bug in #64319
arises because a `dylib` crate type was trying to export a symbol in an
uptream crate but it miscalculated the symbol name of the uptream
symbol. This isn't really necessary, though, since `dylib` crates aren't
that heavily used, so we can just conservatively say that the `dylib`
crate type never exports generic symbols, forcibly removing them from
the exported symbol lists if were to otherwise find them.

The fix here happens in two places:

* First is in the `local_crate_exports_generics` method, indicating that
  it's now `false` for the `Dylib` crate type. Only rlibs actually
  export generics at this point.

* Next is when we load exported symbols from upstream crate. If, for our
  compilation session, the crate may be included from a dynamic library,
  then its generic symbols are removed. When the crate was linked into a
  dynamic library its symbols weren't exported, so we can't consider
  them a candidate to link against.

Overally this should avoid situations where we incorrectly calculate the
upstream symbol names in the face of differnet `share_generics` options,
ultimately...

Closes #64319
2019-09-23 12:29:51 -07:00
..
auxiliary tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
abort-link-to-unwind-dylib.rs Added ignore-sgx for appropriate tests 2019-05-16 14:29:12 -07:00
abort-link-to-unwind-dylib.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
abort-link-to-unwinding-crates.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
abort.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
bad-panic-flag1.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-panic-flag1.stderr Fix error message for -C panic=xxx. 2018-11-19 13:29:35 -08:00
bad-panic-flag2.rs Remove licenses 2018-12-25 21:08:33 -07:00
bad-panic-flag2.stderr Fix error message for -C panic=xxx. 2018-11-19 13:29:35 -08:00
libtest-unwinds.rs Remove double trailing newlines 2019-04-22 16:57:01 +01:00
libtest-unwinds.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
link-to-abort.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
link-to-unwind.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
lto-abort.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
lto-unwind.rs tests: Move run-pass tests without naming conflicts to ui 2019-07-27 18:56:16 +03:00
needs-gate.rs Remove licenses 2018-12-25 21:08:33 -07:00
needs-gate.stderr normalize use of backticks in compiler messages for libsyntax/feature_gate 2019-07-09 14:13:28 +02:00
transitive-link-a-bunch.rs rustc: Fix mixing crates with different share_generics 2019-09-23 12:29:51 -07:00
transitive-link-a-bunch.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
want-unwind-got-abort.rs rustc: Fix mixing crates with different share_generics 2019-09-23 12:29:51 -07:00
want-unwind-got-abort.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00
want-unwind-got-abort2.rs rustc: Fix mixing crates with different share_generics 2019-09-23 12:29:51 -07:00
want-unwind-got-abort2.stderr Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00