File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ fn main() {
57
57
let mut cmd = Command :: new ( rustc) ;
58
58
cmd. args ( & args) . env ( bootstrap:: util:: dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
59
59
60
+ cmd. arg ( "-Clink-arg=-rdynamic" ) ; // Export __cg_clif_global_atomic_mutex from rustc executable for proc macros
61
+
60
62
// Get the name of the crate we're compiling, if any.
61
63
let crate_name =
62
64
args. windows ( 2 ) . find ( |args| args[ 0 ] == "--crate-name" ) . and_then ( |args| args[ 1 ] . to_str ( ) ) ;
Original file line number Diff line number Diff line change
1
+ extern crate libc;
2
+
3
+ #[ no_mangle]
4
+ #[ used]
5
+ pub static mut __cg_clif_global_atomic_mutex: libc:: pthread_mutex_t = libc:: PTHREAD_MUTEX_INITIALIZER ;
6
+
1
7
fn main ( ) {
2
8
// Pull in jemalloc when enabled.
3
9
//
@@ -26,6 +32,8 @@ fn main() {
26
32
static _F6: unsafe extern "C" fn ( * mut c_void ) = jemalloc_sys:: free;
27
33
}
28
34
35
+ unsafe { libc:: pthread_mutex_init ( & mut __cg_clif_global_atomic_mutex, 0 as * const _ ) ; }
36
+
29
37
rustc_driver:: set_sigpipe_handler ( ) ;
30
38
rustc_driver:: main ( )
31
39
}
You can’t perform that action at this time.
0 commit comments