about summary refs log tree commit diff
path: root/compiler/rustc_session/src/errors.rs
diff options
context:
space:
mode:
authorOleksii Lozovskyi <me@ilammy.net>2022-10-02 10:55:35 +0900
committerOleksii Lozovskyi <me@ilammy.net>2023-02-09 12:29:40 +0900
commit3561dc948c1a2a24c2b49992099954a96be3c8ee (patch)
tree01b21b307e9a61c64f18d1f447fc7bb50549e8ec /compiler/rustc_session/src/errors.rs
parent8e49c847400b0ec47d501a72e3c0ad95f81b5fe9 (diff)
downloadrust-3561dc948c1a2a24c2b49992099954a96be3c8ee.tar.gz
rust-3561dc948c1a2a24c2b49992099954a96be3c8ee.zip
Emit an error if -Z instrument-xray is not supported
This is somewhat important because LLVM enables the pass based on
target architecture, but support by the target OS also matters.

For example, XRay attributes are processed by codegen for macOS
targets, but Apple linker fails to process relocations in XRay
data sections, so the feature as a whole is not supported there
for the time being.
Diffstat (limited to 'compiler/rustc_session/src/errors.rs')
-rw-r--r--compiler/rustc_session/src/errors.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/errors.rs b/compiler/rustc_session/src/errors.rs
index 8e8fba5e236..c851145440b 100644
--- a/compiler/rustc_session/src/errors.rs
+++ b/compiler/rustc_session/src/errors.rs
@@ -72,6 +72,12 @@ pub struct ProfileSampleUseFileDoesNotExist<'a> {
 pub struct TargetRequiresUnwindTables;
 
 #[derive(Diagnostic)]
+#[diag(session_instrumentation_not_supported)]
+pub struct InstrumentationNotSupported {
+    pub us: String,
+}
+
+#[derive(Diagnostic)]
 #[diag(session_sanitizer_not_supported)]
 pub struct SanitizerNotSupported {
     pub us: String,