@@ -58,7 +58,7 @@ pub use self::Linkage::*;
58
58
59
59
use std:: ffi:: CString ;
60
60
use std:: cell:: RefCell ;
61
- use std:: { raw, mem, ptr } ;
61
+ use std:: { raw, mem} ;
62
62
use libc:: { c_uint, c_ushort, uint64_t, c_int, size_t, c_char} ;
63
63
use libc:: { c_longlong, c_ulonglong, c_void} ;
64
64
use debuginfo:: { DIBuilderRef , DIDescriptor ,
@@ -2225,65 +2225,6 @@ pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String {
2225
2225
. expect ( "got a non-UTF8 DebugLoc from LLVM" )
2226
2226
}
2227
2227
2228
- // FIXME #15460 - create a public function that actually calls our
2229
- // static LLVM symbols. Otherwise the linker will just throw llvm
2230
- // away. We're just calling lots of stuff until we transitively get
2231
- // all of LLVM. This is worse than anything.
2232
- pub unsafe fn static_link_hack_this_sucks ( ) {
2233
- LLVMInitializePasses ( ) ;
2234
-
2235
- LLVMInitializeX86TargetInfo ( ) ;
2236
- LLVMInitializeX86Target ( ) ;
2237
- LLVMInitializeX86TargetMC ( ) ;
2238
- LLVMInitializeX86AsmPrinter ( ) ;
2239
- LLVMInitializeX86AsmParser ( ) ;
2240
-
2241
- LLVMInitializeARMTargetInfo ( ) ;
2242
- LLVMInitializeARMTarget ( ) ;
2243
- LLVMInitializeARMTargetMC ( ) ;
2244
- LLVMInitializeARMAsmPrinter ( ) ;
2245
- LLVMInitializeARMAsmParser ( ) ;
2246
-
2247
- LLVMInitializeAArch64TargetInfo ( ) ;
2248
- LLVMInitializeAArch64Target ( ) ;
2249
- LLVMInitializeAArch64TargetMC ( ) ;
2250
- LLVMInitializeAArch64AsmPrinter ( ) ;
2251
- LLVMInitializeAArch64AsmParser ( ) ;
2252
-
2253
- LLVMInitializeMipsTargetInfo ( ) ;
2254
- LLVMInitializeMipsTarget ( ) ;
2255
- LLVMInitializeMipsTargetMC ( ) ;
2256
- LLVMInitializeMipsAsmPrinter ( ) ;
2257
- LLVMInitializeMipsAsmParser ( ) ;
2258
-
2259
- LLVMInitializePowerPCTargetInfo ( ) ;
2260
- LLVMInitializePowerPCTarget ( ) ;
2261
- LLVMInitializePowerPCTargetMC ( ) ;
2262
- LLVMInitializePowerPCAsmPrinter ( ) ;
2263
- LLVMInitializePowerPCAsmParser ( ) ;
2264
-
2265
- LLVMRustSetLLVMOptions ( 0 as c_int , ptr:: null ( ) ) ;
2266
-
2267
- LLVMPassManagerBuilderPopulateModulePassManager ( ptr:: null_mut ( ) , ptr:: null_mut ( ) ) ;
2268
- LLVMPassManagerBuilderPopulateLTOPassManager ( ptr:: null_mut ( ) , ptr:: null_mut ( ) , False , False ) ;
2269
- LLVMPassManagerBuilderPopulateFunctionPassManager ( ptr:: null_mut ( ) , ptr:: null_mut ( ) ) ;
2270
- LLVMPassManagerBuilderSetOptLevel ( ptr:: null_mut ( ) , 0 as c_uint ) ;
2271
- LLVMPassManagerBuilderUseInlinerWithThreshold ( ptr:: null_mut ( ) , 0 as c_uint ) ;
2272
- LLVMWriteBitcodeToFile ( ptr:: null_mut ( ) , ptr:: null ( ) ) ;
2273
- LLVMPassManagerBuilderCreate ( ) ;
2274
- LLVMPassManagerBuilderDispose ( ptr:: null_mut ( ) ) ;
2275
-
2276
- LLVMRustLinkInExternalBitcode ( ptr:: null_mut ( ) , ptr:: null ( ) , 0 as size_t ) ;
2277
-
2278
- LLVMLinkInMCJIT ( ) ;
2279
- LLVMLinkInInterpreter ( ) ;
2280
-
2281
- extern {
2282
- fn LLVMLinkInMCJIT ( ) ;
2283
- fn LLVMLinkInInterpreter ( ) ;
2284
- }
2285
- }
2286
-
2287
2228
// The module containing the native LLVM dependencies, generated by the build system
2288
2229
// Note that this must come after the rustllvm extern declaration so that
2289
2230
// parts of LLVM that rustllvm depends on aren't thrown away by the linker.
0 commit comments