about summary refs log tree commit diff
path: root/src/errors.rs
diff options
context:
space:
mode:
authorantoyo <antoyo@users.noreply.github.com>2023-08-30 21:15:39 -0400
committerGitHub <noreply@github.com>2023-08-30 21:15:39 -0400
commit4e41a8a632552de954c2487f238335521cc73185 (patch)
treef761729cedf0ddb962acfc5976e158513c30b818 /src/errors.rs
parent2b956f535e03e2ecaab3f078037ad006419f6c91 (diff)
parent62867dc29f8772db166139d954dbe606ab28c34b (diff)
downloadrust-4e41a8a632552de954c2487f238335521cc73185.tar.gz
rust-4e41a8a632552de954c2487f238335521cc73185.zip
Merge pull request #278 from rust-lang/feature/lto_2023-05-12
Add support for Link-Time Optimization
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 693367192b1..19a967cb489 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -40,3 +40,34 @@ pub(crate) struct TiedTargetFeatures {
     pub span: Span,
     pub features: String,
 }
+
+#[derive(Diagnostic)]
+#[diag(codegen_gcc_copy_bitcode)]
+pub(crate) struct CopyBitcode {
+    pub err: std::io::Error,
+}
+
+#[derive(Diagnostic)]
+#[diag(codegen_gcc_dynamic_linking_with_lto)]
+#[note]
+pub(crate) struct DynamicLinkingWithLTO;
+
+#[derive(Diagnostic)]
+#[diag(codegen_gcc_load_bitcode)]
+pub(crate) struct LoadBitcode {
+    name: String,
+}
+
+#[derive(Diagnostic)]
+#[diag(codegen_gcc_lto_disallowed)]
+pub(crate) struct LtoDisallowed;
+
+#[derive(Diagnostic)]
+#[diag(codegen_gcc_lto_dylib)]
+pub(crate) struct LtoDylib;
+
+#[derive(Diagnostic)]
+#[diag(codegen_gcc_lto_bitcode_from_rlib)]
+pub(crate) struct LtoBitcodeFromRlib {
+    pub gcc_err: String,
+}