@@ -77,36 +77,36 @@ unsafe extern "C" fn strdup(ptr: *const c_char) -> *mut c_char {
77
77
fn main ( ) {
78
78
// See the comment at the top of this file for an explanation of this.
79
79
{
80
- /*
81
- #[used]
82
- static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = calloc;
83
- #[used]
84
- static _F2: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = posix_memalign;
85
- #[used]
86
- static _F3: unsafe extern "C" fn(usize, usize) -> *mut c_void = aligned_alloc;
87
- #[used]
88
- static _F4: unsafe extern "C" fn(usize) -> *mut c_void = malloc;
89
- #[used]
90
- static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = realloc;
91
- #[used]
92
- static _F6: unsafe extern "C" fn(*mut c_void) = free;
93
- #[used]
94
- static _F7: unsafe extern "C" fn(*const c_char) -> *mut c_char = strdup;
95
80
/*
96
- // On OSX, jemalloc doesn't directly override malloc/free, but instead
97
- // registers itself with the allocator's zone APIs in a ctor. However,
98
- // the linker doesn't seem to consider ctors as "used" when statically
99
- // linking, so we need to explicitly depend on the function.
100
- #[cfg(target_os = "macos")]
101
- {
102
- extern "C" {
103
- fn _rjem_je_zone_register();
104
- }
81
+ #[used]
82
+ static _F1: unsafe extern "C" fn(usize, usize) -> *mut c_void = calloc;
83
+ #[used]
84
+ static _F2: unsafe extern "C" fn(*mut *mut c_void, usize, usize) -> c_int = posix_memalign;
85
+ #[used]
86
+ static _F3: unsafe extern "C" fn(usize, usize) -> *mut c_void = aligned_alloc;
87
+ #[used]
88
+ static _F4: unsafe extern "C" fn(usize) -> *mut c_void = malloc;
89
+ #[used]
90
+ static _F5: unsafe extern "C" fn(*mut c_void, usize) -> *mut c_void = realloc;
91
+ #[used]
92
+ static _F6: unsafe extern "C" fn(*mut c_void) = free;
93
+ #[used]
94
+ static _F7: unsafe extern "C" fn(*const c_char) -> *mut c_char = strdup;
95
+ /*
96
+ // On OSX, jemalloc doesn't directly override malloc/free, but instead
97
+ // registers itself with the allocator's zone APIs in a ctor. However,
98
+ // the linker doesn't seem to consider ctors as "used" when statically
99
+ // linking, so we need to explicitly depend on the function.
100
+ #[cfg(target_os = "macos")]
101
+ {
102
+ extern "C" {
103
+ fn _rjem_je_zone_register();
104
+ }
105
105
106
- #[used]
107
- static _F7: unsafe extern "C" fn() = _rjem_je_zone_register;
108
- }*/
109
- */
106
+ #[used]
107
+ static _F7: unsafe extern "C" fn() = _rjem_je_zone_register;
108
+ }*/
109
+ */
110
110
}
111
111
112
112
rustc_driver:: main ( )
0 commit comments