@@ -12,6 +12,7 @@ impl<F: Fn() -> String> Drop for PrintOnPanic<F> {
1212pub  fn  trans_mono_item < ' a ,  ' clif ,  ' tcx :  ' a ,  B :  Backend  + ' static > ( 
1313    cx :  & mut  crate :: CodegenCx < ' a ,  ' clif ,  ' tcx ,  B > , 
1414    mono_item :  MonoItem < ' tcx > , 
15+     linkage :  Linkage , 
1516)  { 
1617    let  tcx = cx. tcx ; 
1718    match  mono_item { 
@@ -42,7 +43,7 @@ pub fn trans_mono_item<'a, 'clif, 'tcx: 'a, B: Backend + 'static>(
4243                } 
4344            } ) ; 
4445
45-             trans_fn ( cx,  inst) ; 
46+             trans_fn ( cx,  inst,  linkage ) ; 
4647        } 
4748        MonoItem :: Static ( def_id)  => { 
4849            crate :: constant:: codegen_static ( & mut  cx. ccx ,  def_id) ; 
@@ -56,6 +57,7 @@ pub fn trans_mono_item<'a, 'clif, 'tcx: 'a, B: Backend + 'static>(
5657fn  trans_fn < ' a ,  ' clif ,  ' tcx :  ' a ,  B :  Backend  + ' static > ( 
5758    cx :  & mut  crate :: CodegenCx < ' a ,  ' clif ,  ' tcx ,  B > , 
5859    instance :  Instance < ' tcx > , 
60+     linkage :  Linkage , 
5961)  { 
6062    let  tcx = cx. tcx ; 
6163
@@ -65,7 +67,7 @@ fn trans_fn<'a, 'clif, 'tcx: 'a, B: Backend + 'static>(
6567    // Step 2. Declare function 
6668    let  ( name,  sig)  = get_function_name_and_sig ( tcx,  instance) ; 
6769    let  func_id = cx. module 
68-         . declare_function ( & name,  Linkage :: Export ,  & sig) 
70+         . declare_function ( & name,  linkage ,  & sig) 
6971        . unwrap ( ) ; 
7072
7173    // Step 3. Make FunctionBuilder 
0 commit comments