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:
@@ -580,7 +580,9 @@ pub fn core_macros() -> @str {
|
||||
|
||||
pub mod $c {
|
||||
#[allow(non_uppercase_statics)];
|
||||
static key: &'static [@::std::condition::Handler<$in, $out>] = &[];
|
||||
static key: ::std::local_data::Key<
|
||||
@::std::condition::Handler<$in, $out>> =
|
||||
&::std::local_data::Key;
|
||||
|
||||
pub static cond :
|
||||
::std::condition::Condition<$in,$out> =
|
||||
@@ -596,7 +598,9 @@ pub fn core_macros() -> @str {
|
||||
// FIXME (#6009): remove mod's `pub` below once variant above lands.
|
||||
pub mod $c {
|
||||
#[allow(non_uppercase_statics)];
|
||||
static key: &'static [@::std::condition::Handler<$in, $out>] = &[];
|
||||
static key: ::std::local_data::Key<
|
||||
@::std::condition::Handler<$in, $out>> =
|
||||
&::std::local_data::Key;
|
||||
|
||||
pub static cond :
|
||||
::std::condition::Condition<$in,$out> =
|
||||
|
||||
Reference in New Issue
Block a user