rust/src/test/run-make
Alex Crichton 0a2282e128 rustc: Continue to tweak "std internal symbols"
In investigating [an issue][1] with `panic_implementation` defined in an
executable that's optimized I once again got to rethinking a bit about the
`rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of
been non-stop tweaking these items ever since their inception, and this
continues to the trend.

The crux of the bug was that in the reachability we have a [different branch][2]
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.

Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of `CodegenFnAttrs`. That way most code no longer even considers weak
lang items and they're simply considered normal functions with attributes about
the ABI.

In the end this fixes the final comment of #51342

[1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019
[2]: 35bf1ae257/src/librustc/middle/reachable.rs (L225-L238)
2018-08-26 16:34:14 -07:00
..
thumb-none-cortex-m change variable definition order (basic thing first). 2018-08-14 22:40:30 +09:00
wasm-custom-section Fix WASM tests 2018-08-05 22:48:49 +01:00
wasm-custom-sections-opt rustc: Work around an upstream wasm ThinLTO bug 2018-07-18 12:12:53 -07:00
wasm-import-module rustc: Stabilize #[wasm_import_module] as #[link(...)] 2018-07-18 07:50:08 -07:00
wasm-panic-small std: Avoid allocating panic message unless needed 2018-04-13 07:04:24 -07:00
wasm-symbols-not-exported add #[panic_handler]; deprecate #[panic_implementation] 2018-08-23 20:58:55 +02:00
wasm-symbols-not-imported rustc: Continue to tweak "std internal symbols" 2018-08-26 16:34:14 -07:00
git_clone_sha1.sh add copyright from template 2018-08-14 23:19:12 +09:00