about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-11 10:06:16 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-16 07:29:49 -0700
commit010702899197b3305126746adb4278d9da370808 (patch)
tree25e5d9026efde46f5af5091bf95f84e2ff92a58a /src/rustllvm/RustWrapper.cpp
parent3e1803f3af1adc1b2e5595650f6920f40bbedc2e (diff)
downloadrust-010702899197b3305126746adb4278d9da370808.tar.gz
rust-010702899197b3305126746adb4278d9da370808.zip
Resume inlining globals across crates
In #8185 cross-crate condition handlers were fixed by ensuring that globals
didn't start appearing in different crates with different addressed. An
unfortunate side effect of that pull request is that constants weren't inlined
across crates (uint::bits is unknown to everything but libstd).

This commit fixes this inlining by using the `available_eternally` linkage
provided by LLVM. It partially reverts #8185, and then adds support for this
linkage type. The main caveat is that not all statics could be inlined into
other crates. Before this patch, all statics were considered "inlineable items",
but an unfortunate side effect of how we deal with `&static` and `&[static]`
means that these two cases cannot be inlined across crates. The translation of
constants was modified to propogate this condition of whether a constant
should be considered inlineable into other crates.

Closes #9036
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions