@@ -27,6 +27,7 @@ const OLD_LLVM_16_VERSION: &str = "esp-16.0.0-20230516";
27
27
const DEFAULT_LLVM_16_VERSION : & str = "esp-16.0.4-20231113" ;
28
28
const DEFAULT_LLVM_17_VERSION : & str = "esp-17.0.1_20240419" ;
29
29
const DEFAULT_LLVM_18_VERSION : & str = "esp-18.1.2_20240912" ;
30
+ const DEFAULT_LLVM_19_VERSION : & str = "esp-19.1.2_20250211" ;
30
31
pub const CLANG_NAME : & str = "xtensa-esp32-elf-clang" ;
31
32
32
33
#[ derive( Debug , Clone , Default ) ]
@@ -50,7 +51,10 @@ pub struct Llvm {
50
51
impl Llvm {
51
52
/// Gets the name of the LLVM arch based on the host triple.
52
53
fn get_arch ( host_triple : & HostTriple , version : & str ) -> String {
53
- if version == DEFAULT_LLVM_17_VERSION || version == DEFAULT_LLVM_18_VERSION {
54
+ if version == DEFAULT_LLVM_17_VERSION
55
+ || version == DEFAULT_LLVM_18_VERSION
56
+ || version == DEFAULT_LLVM_19_VERSION
57
+ {
54
58
let arch = match host_triple {
55
59
HostTriple :: Aarch64AppleDarwin => "aarch64-apple-darwin" ,
56
60
HostTriple :: X86_64AppleDarwin => "x86_64-apple-darwin" ,
@@ -121,11 +125,18 @@ impl Llvm {
121
125
|| ( major == 1 && minor < 81 )
122
126
{
123
127
DEFAULT_LLVM_17_VERSION . to_string ( )
124
- } else {
128
+ } else if ( major == 1 && minor == 84 && patch == 0 && subpatch == 0 )
129
+ || ( major == 1 && minor < 84 )
130
+ {
125
131
DEFAULT_LLVM_18_VERSION . to_string ( )
132
+ } else {
133
+ DEFAULT_LLVM_19_VERSION . to_string ( )
126
134
} ;
127
135
128
- let name = if version == DEFAULT_LLVM_17_VERSION || version == DEFAULT_LLVM_18_VERSION {
136
+ let name = if version == DEFAULT_LLVM_17_VERSION
137
+ || version == DEFAULT_LLVM_18_VERSION
138
+ || version == DEFAULT_LLVM_19_VERSION
139
+ {
129
140
"clang-"
130
141
} else {
131
142
"llvm-"
@@ -139,12 +150,14 @@ impl Llvm {
139
150
Self :: get_arch( host_triple, & version)
140
151
) ;
141
152
142
- let file_name_libs =
143
- if version != DEFAULT_LLVM_17_VERSION && version != DEFAULT_LLVM_18_VERSION {
144
- format ! ( "libs_{file_name_full}" )
145
- } else {
146
- format ! ( "libs-{file_name_full}" )
147
- } ;
153
+ let file_name_libs = if version != DEFAULT_LLVM_17_VERSION
154
+ && version != DEFAULT_LLVM_18_VERSION
155
+ && version != DEFAULT_LLVM_19_VERSION
156
+ {
157
+ format ! ( "libs_{file_name_full}" )
158
+ } else {
159
+ format ! ( "libs-{file_name_full}" )
160
+ } ;
148
161
149
162
// For LLVM 15 and 16 the "full" tarball was a superset of the "libs" tarball, so if
150
163
// we're in extended LLVM mode we only need the "full" tarballs for those versions.
@@ -229,6 +242,14 @@ impl Llvm {
229
242
) ,
230
243
"" ,
231
244
) ;
245
+ updated_path = updated_path. replace (
246
+ & format ! (
247
+ "{}\\ {}\\ esp-clang\\ bin;" ,
248
+ llvm_path. display( ) . to_string( ) . replace( '/' , "\\ " ) ,
249
+ DEFAULT_LLVM_19_VERSION ,
250
+ ) ,
251
+ "" ,
252
+ ) ;
232
253
updated_path = updated_path. replace (
233
254
& format ! (
234
255
"{}\\ esp-clang\\ bin;" ,
0 commit comments