diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2018-07-17 16:20:51 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2018-07-31 10:47:27 -0700 |
| commit | f0bceba669159f7bac581d03412cf69ce4558685 (patch) | |
| tree | 272b110894f0ea6ab0c5c8b786f10610eb7a7e7c /src/librustc_codegen_llvm/llvm | |
| parent | f89817997ac0aa100bf91997194ad85a7e59f743 (diff) | |
| download | rust-f0bceba669159f7bac581d03412cf69ce4558685.tar.gz rust-f0bceba669159f7bac581d03412cf69ce4558685.zip | |
rustc: Handle linker diagnostic from LLVM
Previously linker diagnostic were being hidden when two modules were linked together but failed to link. This commit fixes the situation by ensuring that we have a diagnostic handler installed and also adds support for handling linker diagnostics.
Diffstat (limited to 'src/librustc_codegen_llvm/llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/llvm/diagnostic.rs | 4 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/llvm/ffi.rs | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/llvm/diagnostic.rs b/src/librustc_codegen_llvm/llvm/diagnostic.rs index 7f2a9d6984a..c41a5f74ae3 100644 --- a/src/librustc_codegen_llvm/llvm/diagnostic.rs +++ b/src/librustc_codegen_llvm/llvm/diagnostic.rs @@ -126,6 +126,7 @@ pub enum Diagnostic<'ll> { Optimization(OptimizationDiagnostic<'ll>), InlineAsm(InlineAsmDiagnostic<'ll>), PGO(&'ll DiagnosticInfo), + Linker(&'ll DiagnosticInfo), /// LLVM has other types that we do not wrap here. UnknownDiagnostic(&'ll DiagnosticInfo), @@ -168,6 +169,9 @@ impl Diagnostic<'ll> { Dk::PGOProfile => { PGO(di) } + Dk::Linker => { + Linker(di) + } _ => UnknownDiagnostic(di), } diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 898d3d67353..989498ea92b 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -332,6 +332,7 @@ pub enum DiagnosticKind { OptimizationRemarkOther, OptimizationFailure, PGOProfile, + Linker, } /// LLVMRustArchiveKind |
