Make TLS keys actually take up space
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
This commit is contained in:
parent
e3211fa1f1
commit
9fd2ac7428
16 changed files with 81 additions and 70 deletions
|
@ -485,7 +485,8 @@ fn mk_fresh_ident_interner() -> @ident_interner {
|
|||
// fresh one.
|
||||
pub fn get_ident_interner() -> @ident_interner {
|
||||
#[cfg(not(stage0))]
|
||||
static key: local_data::Key<@@::parse::token::ident_interner> = &[];
|
||||
static key: local_data::Key<@@::parse::token::ident_interner> =
|
||||
&local_data::Key;
|
||||
#[cfg(stage0)]
|
||||
fn key(_: @@::parse::token::ident_interner) {}
|
||||
match local_data::get(key, |k| k.map(|&k| *k)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue