Skip to content

Commit be83d60

Browse files
committed
Rollup merge of rust-lang#22408 - steveklabnik:gh19321, r=nikomatsakis
Fixes rust-lang#19321 ... I think? `make check` passes, but I'm not 100% sure that there's a test for that behavior. Thoughts?
2 parents 2833976 + eeee0e8 commit be83d60

File tree

1 file changed

+1
-60
lines changed

1 file changed

+1
-60
lines changed

src/librustc_llvm/lib.rs

Lines changed: 1 addition & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub use self::Linkage::*;
5858

5959
use std::ffi::CString;
6060
use std::cell::RefCell;
61-
use std::{raw, mem, ptr};
61+
use std::{raw, mem};
6262
use libc::{c_uint, c_ushort, uint64_t, c_int, size_t, c_char};
6363
use libc::{c_longlong, c_ulonglong, c_void};
6464
use debuginfo::{DIBuilderRef, DIDescriptor,
@@ -2251,65 +2251,6 @@ pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String {
22512251
.expect("got a non-UTF8 DebugLoc from LLVM")
22522252
}
22532253

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-
23132254
// The module containing the native LLVM dependencies, generated by the build system
23142255
// Note that this must come after the rustllvm extern declaration so that
23152256
// parts of LLVM that rustllvm depends on aren't thrown away by the linker.

0 commit comments

Comments
 (0)