Create LLVM SDK Build#10
Merged
Merged
Conversation
Contributor
|
nice work! |
CharlesMasson
previously approved these changes
Sep 24, 2025
duburcqa
reviewed
Sep 24, 2025
| cp llvm-project/LICENSE.TXT "$pkgroot/LLVM-LICENSE.txt" || true | ||
| # optional strip to shrink size | ||
| if [ -x "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" ]; then | ||
| find "$pkgroot/bin" -type f -exec "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded {} + || true |
Collaborator
Author
There was a problem hiding this comment.
Soo...
- on Mac, this doesnt exist
/Users/runner/work/_temp/llvm-install/bin/llvm-strip: error: option is not supported for MachO- we could presumably add some kind of condiitonal to not run on Mac
- on arm, this gives
/__w/_temp/llvm-install/bin/llvm-strip: error: '/__w/_temp/taichi-llvm-15.0.7-linux-aarch64/bin/scan-build': The file was not recognized as a valid object file
Collaborator
Author
There was a problem hiding this comment.
(It's possible that the strip also fails on ubuntu x86 tbh, since that build didnt finish yet)
Collaborator
Author
There was a problem hiding this comment.
@johnnynunez thoughts on this llvm-strip error on arm?
Contributor
|
@hughperkins can you try: - name: Package (Linux/macOS)
if: runner.os != 'Windows'
env:
CMAKE_INSTALL_PREFIX: ${{ steps.prefix.outputs.prefix }}
run: |
pkgroot="${RUNNER_TEMP}/taichi-llvm-${LLVM_VERSION}-${{ steps.pkgmeta.outputs.suffix }}"
mkdir -p "$pkgroot"
# copy install tree
cp -R "${CMAKE_INSTALL_PREFIX}/." "$pkgroot/"
# bundle license
# The llvm-project directory is not available in this step, but the license was installed.
cp "${CMAKE_INSTALL_PREFIX}/LICENSE.TXT" "$pkgroot/LLVM-LICENSE.txt" || true
# optional strip to shrink size
if [ -x "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" ]; then
# Strip only ELF binaries and shared objects, not scripts.
find "$pkgroot/bin" -type f -exec file {} + | grep -E 'ELF.*executable|ELF.*shared object' | cut -d: -f1 | xargs --no-run-if-empty "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded
find "$pkgroot/lib" -type f \( -name "*.so*" -o -name "*.dylib" -o -name "*.a" \) \
-exec "${CMAKE_INSTALL_PREFIX}/bin/llvm-strip" --strip-unneeded {} +
fi
( cd "${RUNNER_TEMP}" && zip -r "${GITHUB_WORKSPACE}/${{ steps.pkgmeta.outputs.zip }}" \
"taichi-llvm-${LLVM_VERSION}-${{ steps.pkgmeta.outputs.suffix }}" )
# sha256
( cd "${GITHUB_WORKSPACE}" && shasum -a 256 "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" || sha256sum "${{ steps.pkgmeta.outputs.zip }}" > "${{ steps.pkgmeta.outputs.zip }}.sha256" ) |
hughperkins
commented
Sep 26, 2025
| - name: Compute package name | ||
| id: pkgmeta | ||
| run: | | ||
| os="${RUNNER_OS}" |
Collaborator
Author
There was a problem hiding this comment.
@johnnynunez Where is RUNNER_OS defined?
Collaborator
Author
Contributor
|
@hughperkins good job! |
duburcqa
approved these changes
Sep 26, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

High level goal:
Based on #5 from @johnnynunez
Global changes:
Linux build changes:
Windows build changes: