From 18e708de3ee3f9464f1399e87fe353f5369094cd Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Arcos Date: Tue, 23 Sep 2025 14:46:36 +0200 Subject: [PATCH] Update LLVM and GCC (#527) * feat: Update LLVM * docs: Udpate changelog * feat: Updated GCC --- CHANGELOG.md | 4 +++- src/toolchain/gcc.rs | 2 +- src/toolchain/llvm.rs | 19 ++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2ff2db..3f585c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added option to specify Crosstool-NG version, using `-c` or `--crosstools-toolchain-version` - Added an option for [NuShell](https://www.nushell.sh/) completion +- Add support for LLVM esp-20.1.1_20250829 (#527) + ### Fixed ### Changed -- Updated default GCC / Crosstools version to latest, [`esp-14.2.0_20241119`](https://github.com/espressif/crosstool-NG/releases/tag/esp-14.2.0_20241119) (#508) +- Updated default GCC / Crosstools version to latest, [`esp-15.2.0_20250920`](https://github.com/espressif/crosstool-NG/releases/tag/esp-15.2.0_20250920) (#527) - `espup install -v` now accepts version strings with 1-4 parts. (#525) ### Removed diff --git a/src/toolchain/gcc.rs b/src/toolchain/gcc.rs index 104606f..f4f2ece 100644 --- a/src/toolchain/gcc.rs +++ b/src/toolchain/gcc.rs @@ -16,7 +16,7 @@ use std::{env, fs::File}; use tokio::fs::remove_dir_all; const DEFAULT_GCC_REPOSITORY: &str = "https://github.com/espressif/crosstool-NG/releases/download"; -const DEFAULT_GCC_RELEASE: &str = "14.2.0_20241119"; +const DEFAULT_GCC_RELEASE: &str = "15.2.0_20250920"; pub const RISCV_GCC: &str = "riscv32-esp-elf"; pub const XTENSA_GCC: &str = "xtensa-esp-elf"; diff --git a/src/toolchain/llvm.rs b/src/toolchain/llvm.rs index 0ddd7ee..50666c4 100644 --- a/src/toolchain/llvm.rs +++ b/src/toolchain/llvm.rs @@ -28,6 +28,8 @@ const DEFAULT_LLVM_16_VERSION: &str = "esp-16.0.4-20231113"; const DEFAULT_LLVM_17_VERSION: &str = "esp-17.0.1_20240419"; const DEFAULT_LLVM_18_VERSION: &str = "esp-18.1.2_20240912"; const DEFAULT_LLVM_19_VERSION: &str = "esp-19.1.2_20250225"; +const DEFAULT_LLVM_20_VERSION: &str = "esp-20.1.1_20250829"; + pub const CLANG_NAME: &str = "xtensa-esp32-elf-clang"; #[derive(Debug, Clone, Default)] @@ -54,6 +56,7 @@ impl Llvm { if version == DEFAULT_LLVM_17_VERSION || version == DEFAULT_LLVM_18_VERSION || version == DEFAULT_LLVM_19_VERSION + || version == DEFAULT_LLVM_20_VERSION { let arch = match host_triple { HostTriple::Aarch64AppleDarwin => "aarch64-apple-darwin", @@ -129,13 +132,18 @@ impl Llvm { || (major == 1 && minor < 84) { DEFAULT_LLVM_18_VERSION.to_string() - } else { + } else if (major == 1 && minor == 88 && patch == 0 && subpatch == 0) + || (major == 1 && minor < 88) + { DEFAULT_LLVM_19_VERSION.to_string() + } else { + DEFAULT_LLVM_20_VERSION.to_string() }; let name = if version == DEFAULT_LLVM_17_VERSION || version == DEFAULT_LLVM_18_VERSION || version == DEFAULT_LLVM_19_VERSION + || version == DEFAULT_LLVM_20_VERSION { "clang-" } else { @@ -153,6 +161,7 @@ impl Llvm { let file_name_libs = if version != DEFAULT_LLVM_17_VERSION && version != DEFAULT_LLVM_18_VERSION && version != DEFAULT_LLVM_19_VERSION + && version != DEFAULT_LLVM_20_VERSION { format!("libs_{file_name_full}") } else { @@ -250,6 +259,14 @@ impl Llvm { ), "", ); + updated_path = updated_path.replace( + &format!( + "{}\\{}\\esp-clang\\bin;", + llvm_path.display().to_string().replace('/', "\\"), + DEFAULT_LLVM_20_VERSION, + ), + "", + ); updated_path = updated_path.replace( &format!( "{}\\esp-clang\\bin;",