Skip to content

Commit 77a7aee

Browse files
committed
Allow executables on ESP8266.
1 parent 2b7815e commit 77a7aee

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/librustc_target/spec/xtensa_esp32_none_elf.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub fn target() -> TargetResult {
1818
target_family: Some("unix".to_string()),
1919
cpu: "esp32".to_string(),
2020
linker: Some("rust-lld".to_string()),
21+
2122
max_atomic_width: Some(32),
2223

2324
// Because these devices have very little resources having an

src/librustc_target/spec/xtensa_esp8266_none_elf.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::{abi::Abi, LinkerFlavor, PanicStrategy, Target, TargetOptions, TargetResult, RelocModel};
1+
use crate::spec::{abi::Abi, LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOptions, TargetResult, RelocModel};
22

33
pub fn target() -> TargetResult {
44
Ok(Target {
@@ -11,12 +11,13 @@ pub fn target() -> TargetResult {
1111
target_os: "freertos".to_string(),
1212
target_env: "newlib".to_string(),
1313
target_vendor: "espressif".to_string(),
14-
linker_flavor: LinkerFlavor::Gcc,
14+
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
1515

1616
options: TargetOptions {
17+
executables: true,
1718
target_family: Some("unix".to_string()),
1819
cpu: "esp8266".to_string(),
19-
linker: Some("xtensa-lx106-elf-gcc".to_string()),
20+
linker: Some("rust-lld".to_string()),
2021

2122
max_atomic_width: Some(32),
2223

0 commit comments

Comments
 (0)