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
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
use std::local_data;
|
||||
|
||||
static key: local_data::Key<@&int> = &[]; //~ ERROR only 'static is allowed
|
||||
static key: local_data::Key<@&int> = &local_data::Key;
|
||||
//~^ ERROR only 'static is allowed
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue