about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-09-17 11:24:05 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-09-17 11:24:05 -0700
commit9adcbac30dd229490b0eb3f794fa0cd89e5f457b (patch)
tree2dcab6cbdf5899d95ffff844f7096cfd575e568b /src/libsyntax/parse
parent72e7c62ec4ecddadeccb928ac488a8715d80aef7 (diff)
downloadrust-9adcbac30dd229490b0eb3f794fa0cd89e5f457b.tar.gz
rust-9adcbac30dd229490b0eb3f794fa0cd89e5f457b.zip
Prevent a rare linkage issue with an xcrate static
If a static is flagged as address_insignificant, then for LLVM to actually
perform the relevant optimization it must have an internal linkage type. What
this means, though, is that the static will not be available to other crates.
Hence, if you have a generic function with an inner static, it will fail to link
when built as a library because other crates will attempt to use the inner
static externally.

This gets around the issue by inlining the static into the metadata. The same
relevant optimization is then applied separately in the external crate. What
this ends up meaning is that all statics tagged with #[address_insignificant]
will appear at most once per crate (by value), but they could appear in multiple
crates.

This should be the last blocker for using format! ...
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions