diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-17 15:41:34 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-17 17:33:18 +0530 |
| commit | be83d6029862b6cba08c06d8636041e06a8b8da0 (patch) | |
| tree | 2df40733d25fa67d78114b13d67ed013cbd7ad34 | |
| parent | 2833976cccf6ce8e9740ac5f055435ba17a28b9e (diff) | |
| parent | eeee0e8f4c30301d079ab225f093804c939c3ef3 (diff) | |
| download | rust-be83d6029862b6cba08c06d8636041e06a8b8da0.tar.gz rust-be83d6029862b6cba08c06d8636041e06a8b8da0.zip | |
Rollup merge of #22408 - steveklabnik:gh19321, r=nikomatsakis
Fixes #19321 ... I think? `make check` passes, but I'm not 100% sure that there's a test for that behavior. Thoughts?
| -rw-r--r-- | src/librustc_llvm/lib.rs | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 213e3565362..1136d12a2b1 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -58,7 +58,7 @@ pub use self::Linkage::*; use std::ffi::CString; use std::cell::RefCell; -use std::{raw, mem, ptr}; +use std::{raw, mem}; use libc::{c_uint, c_ushort, uint64_t, c_int, size_t, c_char}; use libc::{c_longlong, c_ulonglong, c_void}; use debuginfo::{DIBuilderRef, DIDescriptor, @@ -2251,65 +2251,6 @@ pub unsafe fn debug_loc_to_string(c: ContextRef, tr: DebugLocRef) -> String { .expect("got a non-UTF8 DebugLoc from LLVM") } -// FIXME #15460 - create a public function that actually calls our -// static LLVM symbols. Otherwise the linker will just throw llvm -// away. We're just calling lots of stuff until we transitively get -// all of LLVM. This is worse than anything. -pub unsafe fn static_link_hack_this_sucks() { - LLVMInitializePasses(); - - LLVMInitializeX86TargetInfo(); - LLVMInitializeX86Target(); - LLVMInitializeX86TargetMC(); - LLVMInitializeX86AsmPrinter(); - LLVMInitializeX86AsmParser(); - - LLVMInitializeARMTargetInfo(); - LLVMInitializeARMTarget(); - LLVMInitializeARMTargetMC(); - LLVMInitializeARMAsmPrinter(); - LLVMInitializeARMAsmParser(); - - LLVMInitializeAArch64TargetInfo(); - LLVMInitializeAArch64Target(); - LLVMInitializeAArch64TargetMC(); - LLVMInitializeAArch64AsmPrinter(); - LLVMInitializeAArch64AsmParser(); - - LLVMInitializeMipsTargetInfo(); - LLVMInitializeMipsTarget(); - LLVMInitializeMipsTargetMC(); - LLVMInitializeMipsAsmPrinter(); - LLVMInitializeMipsAsmParser(); - - LLVMInitializePowerPCTargetInfo(); - LLVMInitializePowerPCTarget(); - LLVMInitializePowerPCTargetMC(); - LLVMInitializePowerPCAsmPrinter(); - LLVMInitializePowerPCAsmParser(); - - LLVMRustSetLLVMOptions(0 as c_int, ptr::null()); - - LLVMPassManagerBuilderPopulateModulePassManager(ptr::null_mut(), ptr::null_mut()); - LLVMPassManagerBuilderPopulateLTOPassManager(ptr::null_mut(), ptr::null_mut(), False, False); - LLVMPassManagerBuilderPopulateFunctionPassManager(ptr::null_mut(), ptr::null_mut()); - LLVMPassManagerBuilderSetOptLevel(ptr::null_mut(), 0 as c_uint); - LLVMPassManagerBuilderUseInlinerWithThreshold(ptr::null_mut(), 0 as c_uint); - LLVMWriteBitcodeToFile(ptr::null_mut(), ptr::null()); - LLVMPassManagerBuilderCreate(); - LLVMPassManagerBuilderDispose(ptr::null_mut()); - - LLVMRustLinkInExternalBitcode(ptr::null_mut(), ptr::null(), 0 as size_t); - - LLVMLinkInMCJIT(); - LLVMLinkInInterpreter(); - - extern { - fn LLVMLinkInMCJIT(); - fn LLVMLinkInInterpreter(); - } -} - // The module containing the native LLVM dependencies, generated by the build system // Note that this must come after the rustllvm extern declaration so that // parts of LLVM that rustllvm depends on aren't thrown away by the linker. |
