@@ -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 ,
@@ -2251,65 +2251,6 @@ pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String {
2251
2251
. expect ( "got a non-UTF8 DebugLoc from LLVM" )
2252
2252
}
2253
2253
2254
- // FIXME #15460 - create a public function that actually calls our
2255
- // static LLVM symbols. Otherwise the linker will just throw llvm
2256
- // away. We're just calling lots of stuff until we transitively get
2257
- // all of LLVM. This is worse than anything.
2258
- pub unsafe fn static_link_hack_this_sucks ( ) {
2259
- LLVMInitializePasses ( ) ;
2260
-
2261
- LLVMInitializeX86TargetInfo ( ) ;
2262
- LLVMInitializeX86Target ( ) ;
2263
- LLVMInitializeX86TargetMC ( ) ;
2264
- LLVMInitializeX86AsmPrinter ( ) ;
2265
- LLVMInitializeX86AsmParser ( ) ;
2266
-
2267
- LLVMInitializeARMTargetInfo ( ) ;
2268
- LLVMInitializeARMTarget ( ) ;
2269
- LLVMInitializeARMTargetMC ( ) ;
2270
- LLVMInitializeARMAsmPrinter ( ) ;
2271
- LLVMInitializeARMAsmParser ( ) ;
2272
-
2273
- LLVMInitializeAArch64TargetInfo ( ) ;
2274
- LLVMInitializeAArch64Target ( ) ;
2275
- LLVMInitializeAArch64TargetMC ( ) ;
2276
- LLVMInitializeAArch64AsmPrinter ( ) ;
2277
- LLVMInitializeAArch64AsmParser ( ) ;
2278
-
2279
- LLVMInitializeMipsTargetInfo ( ) ;
2280
- LLVMInitializeMipsTarget ( ) ;
2281
- LLVMInitializeMipsTargetMC ( ) ;
2282
- LLVMInitializeMipsAsmPrinter ( ) ;
2283
- LLVMInitializeMipsAsmParser ( ) ;
2284
-
2285
- LLVMInitializePowerPCTargetInfo ( ) ;
2286
- LLVMInitializePowerPCTarget ( ) ;
2287
- LLVMInitializePowerPCTargetMC ( ) ;
2288
- LLVMInitializePowerPCAsmPrinter ( ) ;
2289
- LLVMInitializePowerPCAsmParser ( ) ;
2290
-
2291
- LLVMRustSetLLVMOptions ( 0 as c_int , ptr:: null ( ) ) ;
2292
-
2293
- LLVMPassManagerBuilderPopulateModulePassManager ( ptr:: null_mut ( ) , ptr:: null_mut ( ) ) ;
2294
- LLVMPassManagerBuilderPopulateLTOPassManager ( ptr:: null_mut ( ) , ptr:: null_mut ( ) , False , False ) ;
2295
- LLVMPassManagerBuilderPopulateFunctionPassManager ( ptr:: null_mut ( ) , ptr:: null_mut ( ) ) ;
2296
- LLVMPassManagerBuilderSetOptLevel ( ptr:: null_mut ( ) , 0 as c_uint ) ;
2297
- LLVMPassManagerBuilderUseInlinerWithThreshold ( ptr:: null_mut ( ) , 0 as c_uint ) ;
2298
- LLVMWriteBitcodeToFile ( ptr:: null_mut ( ) , ptr:: null ( ) ) ;
2299
- LLVMPassManagerBuilderCreate ( ) ;
2300
- LLVMPassManagerBuilderDispose ( ptr:: null_mut ( ) ) ;
2301
-
2302
- LLVMRustLinkInExternalBitcode ( ptr:: null_mut ( ) , ptr:: null ( ) , 0 as size_t ) ;
2303
-
2304
- LLVMLinkInMCJIT ( ) ;
2305
- LLVMLinkInInterpreter ( ) ;
2306
-
2307
- extern {
2308
- fn LLVMLinkInMCJIT ( ) ;
2309
- fn LLVMLinkInInterpreter ( ) ;
2310
- }
2311
- }
2312
-
2313
2254
// The module containing the native LLVM dependencies, generated by the build system
2314
2255
// Note that this must come after the rustllvm extern declaration so that
2315
2256
// parts of LLVM that rustllvm depends on aren't thrown away by the linker.
0 commit comments