Update LLVM and GCC (#527)

* feat: Update LLVM

* docs: Udpate changelog

* feat: Updated GCC
This commit is contained in:
Sergio Gasquez Arcos 2025-09-23 14:46:36 +02:00 committed by GitHub
parent 265b643fc7
commit 18e708de3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 3 deletions

View File

@ -10,11 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Added option to specify Crosstool-NG version, using `-c` or `--crosstools-toolchain-version` - Added option to specify Crosstool-NG version, using `-c` or `--crosstools-toolchain-version`
- Added an option for [NuShell](https://www.nushell.sh/) completion - Added an option for [NuShell](https://www.nushell.sh/) completion
- Add support for LLVM esp-20.1.1_20250829 (#527)
### Fixed ### Fixed
### Changed ### 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) - `espup install -v` now accepts version strings with 1-4 parts. (#525)
### Removed ### Removed

View File

@ -16,7 +16,7 @@ use std::{env, fs::File};
use tokio::fs::remove_dir_all; use tokio::fs::remove_dir_all;
const DEFAULT_GCC_REPOSITORY: &str = "https://github.com/espressif/crosstool-NG/releases/download"; 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 RISCV_GCC: &str = "riscv32-esp-elf";
pub const XTENSA_GCC: &str = "xtensa-esp-elf"; pub const XTENSA_GCC: &str = "xtensa-esp-elf";

View File

@ -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_17_VERSION: &str = "esp-17.0.1_20240419";
const DEFAULT_LLVM_18_VERSION: &str = "esp-18.1.2_20240912"; 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_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"; pub const CLANG_NAME: &str = "xtensa-esp32-elf-clang";
#[derive(Debug, Clone, Default)] #[derive(Debug, Clone, Default)]
@ -54,6 +56,7 @@ impl Llvm {
if version == DEFAULT_LLVM_17_VERSION if version == DEFAULT_LLVM_17_VERSION
|| version == DEFAULT_LLVM_18_VERSION || version == DEFAULT_LLVM_18_VERSION
|| version == DEFAULT_LLVM_19_VERSION || version == DEFAULT_LLVM_19_VERSION
|| version == DEFAULT_LLVM_20_VERSION
{ {
let arch = match host_triple { let arch = match host_triple {
HostTriple::Aarch64AppleDarwin => "aarch64-apple-darwin", HostTriple::Aarch64AppleDarwin => "aarch64-apple-darwin",
@ -129,13 +132,18 @@ impl Llvm {
|| (major == 1 && minor < 84) || (major == 1 && minor < 84)
{ {
DEFAULT_LLVM_18_VERSION.to_string() 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() DEFAULT_LLVM_19_VERSION.to_string()
} else {
DEFAULT_LLVM_20_VERSION.to_string()
}; };
let name = if version == DEFAULT_LLVM_17_VERSION let name = if version == DEFAULT_LLVM_17_VERSION
|| version == DEFAULT_LLVM_18_VERSION || version == DEFAULT_LLVM_18_VERSION
|| version == DEFAULT_LLVM_19_VERSION || version == DEFAULT_LLVM_19_VERSION
|| version == DEFAULT_LLVM_20_VERSION
{ {
"clang-" "clang-"
} else { } else {
@ -153,6 +161,7 @@ impl Llvm {
let file_name_libs = if version != DEFAULT_LLVM_17_VERSION let file_name_libs = if version != DEFAULT_LLVM_17_VERSION
&& version != DEFAULT_LLVM_18_VERSION && version != DEFAULT_LLVM_18_VERSION
&& version != DEFAULT_LLVM_19_VERSION && version != DEFAULT_LLVM_19_VERSION
&& version != DEFAULT_LLVM_20_VERSION
{ {
format!("libs_{file_name_full}") format!("libs_{file_name_full}")
} else { } 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( updated_path = updated_path.replace(
&format!( &format!(
"{}\\esp-clang\\bin;", "{}\\esp-clang\\bin;",