about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorJonathan Turner <jonathandturner@users.noreply.github.com>2016-10-24 15:41:29 -0700
committerGitHub <noreply@github.com>2016-10-24 15:41:29 -0700
commite7da61975f168ff91c55233f489923fa1acd47e9 (patch)
tree5a5b73a10502641b3fb082ece6014844b61919cc /src/test/run-pass/thinlto
parent050499c407218fb6b0044bc4a16ffbfb906ec3a4 (diff)
parent992203b9764c7e4e48ca454aa3162ee7d73cb87c (diff)
downloadrust-e7da61975f168ff91c55233f489923fa1acd47e9.tar.gz
rust-e7da61975f168ff91c55233f489923fa1acd47e9.zip
Rollup merge of #37328 - michaelwoerister:stable-local-symbol-names, r=nagisa
trans: Make names of internal symbols independent of CGU translation order

Every codegen unit gets its own local counter for generating new symbol names. This makes bitcode and object files reproducible at the binary level even when incremental compilation is used.

The PR also solves a rare ICE resulting from a naming conflict between a user defined name and a generated one. E.g. try compiling the following program with 1.12.1 stable:
```rust

pub fn str7233() -> &'static str { "foo" }
```
This results in:
> error: internal compiler error: ../src/librustc_trans/common.rs:979: symbol `str7233` is already defined

Running into this is not very likely but it's also easily avoidable.
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions