Skip to content

Commit 2b43689

Browse files
committed
Add esp8266 no_std target
1 parent 1a0a3c4 commit 2b43689

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,7 @@ supported_targets! {
17201720
("xtensa-esp32s2-espidf", xtensa_esp32s2_espidf),
17211721
("xtensa-esp32s3-none-elf", xtensa_esp32s3_none_elf),
17221722
("xtensa-esp32s3-espidf", xtensa_esp32s3_espidf),
1723+
("xtensa-esp8266-none-elf", xtensa_esp8266_none_elf),
17231724

17241725
("i686-wrs-vxworks", i686_wrs_vxworks),
17251726
("x86_64-wrs-vxworks", x86_64_wrs_vxworks),
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
use crate::spec::{Arch, base::xtensa, Target, TargetOptions};
2+
3+
pub(crate) fn target() -> Target {
4+
Target {
5+
llvm_target: "xtensa-none-elf".into(),
6+
pointer_width: 32,
7+
data_layout: "e-m:e-p:32:32-v1:8:8-i64:64-i128:128-n32".into(),
8+
arch: Arch::Xtensa,
9+
metadata: crate::spec::TargetMetadata {
10+
description: Some("Xtensa ESP8266".into()),
11+
tier: Some(3),
12+
host_tools: Some(false),
13+
std: Some(false),
14+
},
15+
16+
options: TargetOptions {
17+
cpu: "esp8266".into(),
18+
linker: Some("xtensa-lx106-elf-gcc".into()),
19+
max_atomic_width: Some(32),
20+
features: "+forced-atomics".into(),
21+
..xtensa::opts()
22+
},
23+
}
24+
}

0 commit comments

Comments
 (0)