[linux][apps][arm64] Add arm64 linux with vcpkg#6431
Conversation
7819d8d to
43d289b
Compare
|
I verify the headers of the files from artifacts. I also got the Machine aarch64. Also when I try long time ago to combine the libs from vcpkg to build with the script, I found they don't compatible. But let's assume these files compile in aarch64 correctly, this PR compile more apps in aarch64, improving the current scripts. |
.github/workflows/linux.yml
Outdated
| strategy: | ||
| matrix: | ||
| type: [libs, client, apps, manager, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, libs-arm64, apps-arm64, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test] | ||
| type: [libs, client, apps, manager, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, libs-vcpkg-arm64, apps-vcpkg-arm64, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test] |
There was a problem hiding this comment.
It is ok to add libs-vcpkg-arm64 and apps-vcpkg-arm64 but these must not replace existing libs-arm64 and apps-arm64
43d289b to
2c32e02
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for building and packaging Linux ARM64 targets using vcpkg. Key changes include:
- Refactoring sample Makefiles to use
$(CXX)for locatinglibstdc++.a - Introducing ARM64-specific vcpkg scripts and CI configuration under
linux/arm64/ - Extending deployment and GitHub Actions workflows to include
libs-vcpkg-arm64andapps-vcpkg-arm64matrix entries
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| samples/openclapp/Makefile* | Switched to $(CXX) -print-file-name for cross-compilation |
| linux/arm64/update_vcpkg_*.sh | Added scripts to clone, bootstrap, and install vcpkg libs/apps for arm64 |
| linux/arm64/ci_configure_*.sh | Added CI configure scripts for libs/apps on ARM64 |
| deploy/prepare_deployment.py | Added prepare_linux_apps_vcpkg_arm64 function to include ARM64 apps-vcpkg archive |
| .github/workflows/linux.yml | Expanded matrix types and added ARM64 vcpkg install/build steps |
Comments suppressed due to low confidence (3)
.github/workflows/linux.yml:73
- [nitpick] The here-document is indented, which will introduce leading spaces in the generated sources list file. Consider using an unindented EOF or
<<-EOTto trim indentation for cleaner formatting.
cat <<EOT >> arm-cross-compile-sources.list
linux/arm64/update_vcpkg_libs.sh:5
- [nitpick] The error message could be more helpful by including the script name, e.g.,
echo "[update_vcpkg_libs.sh] Please run this from the project root".
echo "start this script in the source root directory"
deploy/prepare_deployment.py:326
- The new
prepare_linux_apps_vcpkg_arm64function isn't covered by existing tests. Consider adding a unit test to verify it produces the expected 7z archive entry.
def prepare_linux_apps_vcpkg_arm64(target_directory):
| if [ ! -d $VCPKG_ROOT ]; then | ||
| mkdir -p $BUILD_DIR | ||
| git -C $BUILD_DIR clone $VCPKG_LINK | ||
| fi | ||
|
|
||
| git -C $VCPKG_ROOT pull | ||
| $VCPKG_ROOT/bootstrap-vcpkg.sh | ||
| $VCPKG_ROOT/vcpkg install --x-manifest-root=3rdParty/vcpkg_ports/configs/libs/ --x-install-root=$VCPKG_ROOT/installed/ --overlay-ports=$VCPKG_PORTS/ports --overlay-triplets=$VCPKG_PORTS/triplets/ci --triplet=arm64-linux-release --clean-after-build |
There was a problem hiding this comment.
Wrap the variable in quotes to prevent word splitting or globbing if the path contains spaces: if [ ! -d "$VCPKG_ROOT" ]; then.
| if [ ! -d $VCPKG_ROOT ]; then | |
| mkdir -p $BUILD_DIR | |
| git -C $BUILD_DIR clone $VCPKG_LINK | |
| fi | |
| git -C $VCPKG_ROOT pull | |
| $VCPKG_ROOT/bootstrap-vcpkg.sh | |
| $VCPKG_ROOT/vcpkg install --x-manifest-root=3rdParty/vcpkg_ports/configs/libs/ --x-install-root=$VCPKG_ROOT/installed/ --overlay-ports=$VCPKG_PORTS/ports --overlay-triplets=$VCPKG_PORTS/triplets/ci --triplet=arm64-linux-release --clean-after-build | |
| if [ ! -d "$VCPKG_ROOT" ]; then | |
| mkdir -p "$BUILD_DIR" | |
| git -C "$BUILD_DIR" clone "$VCPKG_LINK" | |
| fi | |
| git -C "$VCPKG_ROOT" pull | |
| "$VCPKG_ROOT/bootstrap-vcpkg.sh" | |
| "$VCPKG_ROOT/vcpkg" install --x-manifest-root=3rdParty/vcpkg_ports/configs/libs/ --x-install-root="$VCPKG_ROOT/installed/" --overlay-ports="$VCPKG_PORTS/ports" --overlay-triplets="$VCPKG_PORTS/triplets/ci" --triplet=arm64-linux-release --clean-after-build |
| VCPKG_PORTS="$PWD/3rdParty/vcpkg_ports" | ||
| VCPKG_ROOT="$BUILD_DIR/vcpkg" | ||
|
|
||
| if [ ! -d $VCPKG_ROOT ]; then |
There was a problem hiding this comment.
Similarly, quote the path variable here to handle spaces safely: if [ ! -d "$VCPKG_ROOT" ]; then.
| if [ ! -d $VCPKG_ROOT ]; then | |
| if [ ! -d "$VCPKG_ROOT" ]; then |
|
Thank you for the PR. |
[linux][apps][arm64] Add arm64 linux with vcpkg

Add arm64 linux with vcpkg
Fix #4782