about summary refs log tree commit diff
path: root/compiler/rustc_target/src/spec/base/avr_gnu.rs
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2024-03-10 20:46:08 +0100
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2024-03-10 20:46:08 +0100
commit5bcb66cfb36d19b84ff51cf923c1d3536d446281 (patch)
tree4aa119378e391b1ab0d93c2730e68465c366b43b /compiler/rustc_target/src/spec/base/avr_gnu.rs
parentaf69f4c48c1e1cfbb9ba43b376edcfbdd8cfbca4 (diff)
downloadrust-5bcb66cfb36d19b84ff51cf923c1d3536d446281.tar.gz
rust-5bcb66cfb36d19b84ff51cf923c1d3536d446281.zip
Add metadata to targets
This adds four pieces of metadata to every target:
- description
- tier
- host tools
- std

This information is currently scattered across target docs and both
- not machine readable, making validation harder
- sometimes subtly encoding by the table it's in, causing mistakes and
  making it harder to review changes to the properties

By putting it in the compiler, we improve this. Later, we will use this
canonical information to generate target documentation from it.
Diffstat (limited to 'compiler/rustc_target/src/spec/base/avr_gnu.rs')
-rw-r--r--compiler/rustc_target/src/spec/base/avr_gnu.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/base/avr_gnu.rs b/compiler/rustc_target/src/spec/base/avr_gnu.rs
index 1e410cea8d6..211d52f5b07 100644
--- a/compiler/rustc_target/src/spec/base/avr_gnu.rs
+++ b/compiler/rustc_target/src/spec/base/avr_gnu.rs
@@ -8,7 +8,12 @@ use object::elf;
 pub fn target(target_cpu: &'static str, mmcu: &'static str) -> Target {
     Target {
         arch: "avr".into(),
-        description: None,
+        metadata: crate::spec::TargetMetadata {
+            description: None,
+            tier: None,
+            host_tools: None,
+            std: None,
+        },
         data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8".into(),
         llvm_target: "avr-unknown-unknown".into(),
         pointer_width: 16,