use prebuilt esp-llvm
This commit is contained in:
@@ -36,8 +36,8 @@ type Export struct {
|
|||||||
const wasiSdkUrl = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-macos.tar.gz"
|
const wasiSdkUrl = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-macos.tar.gz"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
espClangBaseUrl = "https://github.com/espressif/llvm-project/releases/download/esp-19.1.2_20250312"
|
espClangBaseUrl = "https://github.com/goplus/espressif-llvm-project-prebuilt/releases/download/19.1.2_20250805"
|
||||||
espClangVersion = "esp-19.1.2_20250312"
|
espClangVersion = "19.1.2_20250805"
|
||||||
)
|
)
|
||||||
|
|
||||||
func cacheDir() string {
|
func cacheDir() string {
|
||||||
|
|||||||
@@ -133,17 +133,10 @@ func downloadAndExtractESPClang(platformSuffix, dir string) error {
|
|||||||
defer os.RemoveAll(downloadDir)
|
defer os.RemoveAll(downloadDir)
|
||||||
|
|
||||||
// Download clang binary package
|
// Download clang binary package
|
||||||
clangUrl := fmt.Sprintf("%s/clang-%s-%s.tar.xz", espClangBaseUrl, espClangVersion, platformSuffix)
|
clangUrl := fmt.Sprintf("%s/clang-esp-%s-%s.tar.xz", espClangBaseUrl, espClangVersion, platformSuffix)
|
||||||
clangFile := filepath.Join(downloadDir, fmt.Sprintf("clang-%s-%s.tar.xz", espClangVersion, platformSuffix))
|
clangFile := filepath.Join(downloadDir, fmt.Sprintf("clang-%s-%s.tar.xz", espClangVersion, platformSuffix))
|
||||||
if err := downloadFile(clangUrl, clangFile); err != nil {
|
if err := downloadFile(clangUrl, clangFile); err != nil {
|
||||||
return fmt.Errorf("failed to download clang: %w", err)
|
return fmt.Errorf("failed to download clang from %s: %w", clangUrl, err)
|
||||||
}
|
|
||||||
|
|
||||||
// Download libs package
|
|
||||||
libsUrl := fmt.Sprintf("%s/libs-clang-%s-%s.tar.xz", espClangBaseUrl, espClangVersion, platformSuffix)
|
|
||||||
libsFile := filepath.Join(downloadDir, fmt.Sprintf("libs-clang-%s-%s.tar.xz", espClangVersion, platformSuffix))
|
|
||||||
if err := downloadFile(libsUrl, libsFile); err != nil {
|
|
||||||
return fmt.Errorf("failed to download libs: %w", err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create extract temp directory
|
// Create extract temp directory
|
||||||
@@ -158,9 +151,6 @@ func downloadAndExtractESPClang(platformSuffix, dir string) error {
|
|||||||
if err := extractTarXz(clangFile, extractDir); err != nil {
|
if err := extractTarXz(clangFile, extractDir); err != nil {
|
||||||
return fmt.Errorf("failed to extract clang: %w", err)
|
return fmt.Errorf("failed to extract clang: %w", err)
|
||||||
}
|
}
|
||||||
if err := extractTarXz(libsFile, extractDir); err != nil {
|
|
||||||
return fmt.Errorf("failed to extract libs: %w", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rename esp-clang directory to final destination
|
// Rename esp-clang directory to final destination
|
||||||
espClangDir := filepath.Join(extractDir, "esp-clang")
|
espClangDir := filepath.Join(extractDir, "esp-clang")
|
||||||
|
|||||||
Reference in New Issue
Block a user