-
Notifications
You must be signed in to change notification settings - Fork 46
release:compile & release with esp clang/llvm #1253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9cea322
ci:fail when docker start error
luoliwoshang a190118
install with esp-clang & new cache key
luoliwoshang 848432e
ci:sysroot for linux
luoliwoshang 68623f0
env:find crosscompile llvm
luoliwoshang 0340ef2
goreleaser:move clang to result
luoliwoshang 6ce28e4
goreleaser:keep file level
luoliwoshang 92beb56
goreleaser:relative rpath
luoliwoshang d0cf57f
ci:test release without llvm dependency
luoliwoshang e05f890
temp remove origin rpath set
luoliwoshang 9f48753
allow sysroot
luoliwoshang f66bbb7
execute rpath search
luoliwoshang 3be12dc
ci:test helloword with embed target
luoliwoshang 7907e69
Merge remote-tracking branch 'upstream/main' into release/esp-clang
luoliwoshang e63ebb8
goreleaser:avoid fail
luoliwoshang a17f1f0
set origin test
luoliwoshang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| ESP_CLANG_VERSION="19.1.2_20250905-3" | ||
| BASE_URL="https://github.com/goplus/espressif-llvm-project-prebuilt/releases/download/${ESP_CLANG_VERSION}" | ||
|
|
||
| get_esp_clang_platform() { | ||
| local platform="$1" | ||
| local os="${platform%-*}" | ||
| local arch="${platform##*-}" | ||
|
|
||
| case "${os}" in | ||
| "darwin") | ||
| case "${arch}" in | ||
| "amd64") echo "x86_64-apple-darwin" ;; | ||
| "arm64") echo "aarch64-apple-darwin" ;; | ||
| *) echo "Error: Unsupported darwin architecture: ${arch}" >&2; exit 1 ;; | ||
| esac | ||
| ;; | ||
| "linux") | ||
| case "${arch}" in | ||
| "amd64") echo "x86_64-linux-gnu" ;; | ||
| "arm64") echo "aarch64-linux-gnu" ;; | ||
| *) echo "Error: Unsupported linux architecture: ${arch}" >&2; exit 1 ;; | ||
| esac | ||
| ;; | ||
| *) | ||
| echo "Error: Unsupported OS: ${os}" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
| } | ||
|
|
||
| get_filename() { | ||
| local platform="$1" | ||
| local platform_suffix=$(get_esp_clang_platform "${platform}") | ||
| echo "clang-esp-${ESP_CLANG_VERSION}-${platform_suffix}.tar.xz" | ||
| } | ||
|
|
||
| download_and_extract() { | ||
| local platform="$1" | ||
| local os="${platform%-*}" | ||
| local arch="${platform##*-}" | ||
| local filename=$(get_filename "${platform}") | ||
| local download_url="${BASE_URL}/${filename}" | ||
|
|
||
| echo "Downloading ESP Clang for ${platform}..." | ||
| echo " URL: ${download_url}" | ||
|
|
||
| mkdir -p ".sysroot/${os}/${arch}/crosscompile/clang" | ||
| curl -fsSL "${download_url}" | tar -xJ -C ".sysroot/${os}/${arch}/crosscompile/clang" --strip-components=1 | ||
|
|
||
| if [[ ! -f ".sysroot/${os}/${arch}/crosscompile/clang/bin/clang++" ]]; then | ||
| echo "Error: clang++ not found in ${platform} toolchain" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "${platform} ESP Clang ready in .sysroot/${os}/${arch}/crosscompile/clang" | ||
| } | ||
|
|
||
| echo "Downloading ESP Clang toolchain version ${ESP_CLANG_VERSION}..." | ||
|
|
||
| for platform in "darwin-amd64" "darwin-arm64" "linux-amd64" "linux-arm64"; do | ||
| download_and_extract "${platform}" | ||
| done | ||
|
|
||
| echo "ESP Clang toolchain completed successfully!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE:To avoid
$ORIGINbeing unexpectedly escaped in yml, it needs to be added in-extldflags