From 51537c686c16121aecb5a2b916a1c91a68d60770 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Oct 2024 20:08:48 +0200 Subject: [PATCH] Fix target_vendor in non-idf Xtensa ESP32 targets The Xtensa ESP32 targets are the following: - xtensa-esp32-none-elf - xtensa-esp32-espidf - xtensa-esp32s2-none-elf - xtensa-esp32s2-espidf - xtensa-esp32s3-none-elf - xtensa-esp32s3-espidf The ESP-IDF targets already set `target_vendor="espressif"`, however, the ESP32 is produced by Espressif regardless of whether using the IDF or not, so we should set the target vendor there as well. --- compiler/rustc_target/src/spec/targets/xtensa_esp32_none_elf.rs | 1 + .../rustc_target/src/spec/targets/xtensa_esp32s2_none_elf.rs | 1 + .../rustc_target/src/spec/targets/xtensa_esp32s3_none_elf.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/compiler/rustc_target/src/spec/targets/xtensa_esp32_none_elf.rs b/compiler/rustc_target/src/spec/targets/xtensa_esp32_none_elf.rs index 51960dbec4af4..254ae54db21f7 100644 --- a/compiler/rustc_target/src/spec/targets/xtensa_esp32_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/xtensa_esp32_none_elf.rs @@ -15,6 +15,7 @@ pub(crate) fn target() -> Target { }, options: TargetOptions { + vendor: "espressif".into(), cpu: "esp32".into(), linker: Some("xtensa-esp32-elf-gcc".into()), max_atomic_width: Some(32), diff --git a/compiler/rustc_target/src/spec/targets/xtensa_esp32s2_none_elf.rs b/compiler/rustc_target/src/spec/targets/xtensa_esp32s2_none_elf.rs index 21330615a874d..34d8383a60476 100644 --- a/compiler/rustc_target/src/spec/targets/xtensa_esp32s2_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/xtensa_esp32s2_none_elf.rs @@ -15,6 +15,7 @@ pub(crate) fn target() -> Target { }, options: TargetOptions { + vendor: "espressif".into(), cpu: "esp32-s2".into(), linker: Some("xtensa-esp32s2-elf-gcc".into()), max_atomic_width: Some(32), diff --git a/compiler/rustc_target/src/spec/targets/xtensa_esp32s3_none_elf.rs b/compiler/rustc_target/src/spec/targets/xtensa_esp32s3_none_elf.rs index fca47b4bdb121..023a67f28719f 100644 --- a/compiler/rustc_target/src/spec/targets/xtensa_esp32s3_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/xtensa_esp32s3_none_elf.rs @@ -15,6 +15,7 @@ pub(crate) fn target() -> Target { }, options: TargetOptions { + vendor: "espressif".into(), cpu: "esp32-s3".into(), linker: Some("xtensa-esp32s3-elf-gcc".into()), max_atomic_width: Some(32),