diff --git a/.github/workflows/flutter-engine-arm64.yaml b/.github/workflows/flutter-engine-arm64.yaml index d2cfed9..d07fae1 100644 --- a/.github/workflows/flutter-engine-arm64.yaml +++ b/.github/workflows/flutter-engine-arm64.yaml @@ -42,22 +42,27 @@ jobs: run: | export PATH=$PATH:$PWD/depot_tools export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython - gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]' + git clone https://github.com/flutter/flutter.git + pushd flutter + gclient config --spec 'solutions=[{"managed":False,"name":".","url":"https://github.com/flutter/flutter.git","custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True},"deps_file":"DEPS","safesync_url":""}]' gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v - - PATCH_DIR=$PWD/patches + popd # fetch sysroot - cd src + cd flutter/engine/src build/linux/sysroot_scripts/install-sysroot.py --arch=$arch + - name: Patch Flutter Source + run: | + PATCH_DIR=$PWD/patches + cd flutter git apply $PATCH_DIR/0001-clang-toolchain.patch - name: Build Debug - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -76,9 +81,9 @@ jobs: - name: Prepare Debug Artifacts run: | - scripts/prepare-sdk-$arch.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_debug_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/ + tar czfhv $tag_debug.tar.gz flutter/engine/src/out/linux_debug_$arch/engine-sdk/ sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256 @@ -103,10 +108,10 @@ jobs: gh release edit "$tag_debug" --draft=false - name: Build Debug Unoptimized - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -126,9 +131,9 @@ jobs: - name: Prepare Debug Unoptimized Artifacts run: | - scripts/prepare-sdk-$arch.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_debug_unopt_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/ + tar czfhv $tag_debug_unopt.tar.gz flutter/engine/src/out/linux_debug_unopt_$arch/engine-sdk/ sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256 @@ -153,10 +158,10 @@ jobs: gh release edit "$tag_debug_unopt" --draft=false - name: Build Release - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -175,9 +180,9 @@ jobs: - name: Prepare Release Artifacts run: | - scripts/prepare-sdk-$arch.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_release_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/ + tar czfhv $tag_release.tar.gz flutter/engine/src/out/linux_release_$arch/engine-sdk/ sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256 @@ -202,10 +207,10 @@ jobs: gh release edit "$tag_release" --draft=false - name: Build Profile - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -224,9 +229,9 @@ jobs: - name: Prepare Profile Artifacts run: | - scripts/prepare-sdk-$arch.sh src/out/linux_profile_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_profile_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/ + tar czfhv $tag_profile.tar.gz flutter/engine/src/out/linux_profile_$arch/engine-sdk/ sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256 diff --git a/.github/workflows/flutter-engine-armv7hf.yaml b/.github/workflows/flutter-engine-armv7hf.yaml index 3dae2a3..233455f 100644 --- a/.github/workflows/flutter-engine-armv7hf.yaml +++ b/.github/workflows/flutter-engine-armv7hf.yaml @@ -42,22 +42,27 @@ jobs: run: | export PATH=$PATH:$PWD/depot_tools export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython - gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]' + git clone https://github.com/flutter/flutter.git + pushd flutter + gclient config --spec 'solutions=[{"managed":False,"name":".","url":"https://github.com/flutter/flutter.git","custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True},"deps_file":"DEPS","safesync_url":""}]' gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v - - PATCH_DIR=$PWD/patches + popd # fetch sysroot - cd src + cd flutter/engine/src build/linux/sysroot_scripts/install-sysroot.py --arch=$arch + - name: Patch Flutter Source + run: | + PATCH_DIR=$PWD/patches + cd flutter git apply $PATCH_DIR/0001-clang-toolchain.patch - name: Build Debug - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -77,9 +82,9 @@ jobs: - name: Prepare Debug Artifacts run: | - scripts/prepare-sdk-armv7hf.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_debug_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/ + tar czfhv $tag_debug.tar.gz flutter/engine/src/out/linux_debug_$arch/engine-sdk/ sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256 @@ -104,10 +109,10 @@ jobs: gh release edit "$tag_debug" --draft=false - name: Build Debug Unoptimized - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -127,9 +132,9 @@ jobs: - name: Prepare Debug Unoptimized Artifacts run: | - scripts/prepare-sdk-armv7hf.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_debug_unopt_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/ + tar czfhv $tag_debug_unopt.tar.gz flutter/engine/src/out/linux_debug_unopt_$arch/engine-sdk/ sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256 @@ -154,10 +159,10 @@ jobs: gh release edit "$tag_debug_unopt" --draft=false - name: Build Release - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -177,9 +182,9 @@ jobs: - name: Prepare Release Artifacts run: | - scripts/prepare-sdk-armv7hf.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_release_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/ + tar czfhv $tag_release.tar.gz flutter/engine/src/out/linux_release_$arch/engine-sdk/ sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256 @@ -204,10 +209,10 @@ jobs: gh release edit "$tag_release" --draft=false - name: Build Profile - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -226,9 +231,9 @@ jobs: - name: Prepare Profile Artifacts run: | - scripts/prepare-sdk-armv7hf.sh src/out/linux_profile_$arch $PWD/src/build/linux/debian_sid_arm-sysroot + scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_profile_$arch $PWD/flutter/engine/src/build/linux/debian_sid_arm-sysroot - tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/ + tar czfhv $tag_profile.tar.gz flutter/engine/src/out/linux_profile_$arch/engine-sdk/ sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256 diff --git a/.github/workflows/flutter-engine-x86_64.yaml b/.github/workflows/flutter-engine-x86_64.yaml index 00d0e3a..0565a2e 100644 --- a/.github/workflows/flutter-engine-x86_64.yaml +++ b/.github/workflows/flutter-engine-x86_64.yaml @@ -42,19 +42,27 @@ jobs: run: | export PATH=$PATH:$PWD/depot_tools export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython - gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]' - gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.srcrev }} -j$(nproc) -v + git clone https://github.com/flutter/flutter.git + pushd flutter + gclient config --spec 'solutions=[{"managed":False,"name":".","url":"https://github.com/flutter/flutter.git","custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True},"deps_file":"DEPS","safesync_url":""}]' + gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v + popd - PATCH_DIR=$PWD/patches + # fetch sysroot + cd flutter/engine/src + build/linux/sysroot_scripts/install-sysroot.py --arch=$arch - cd src + - name: Patch Flutter Source + run: | + PATCH_DIR=$PWD/patches + cd flutter git apply $PATCH_DIR/0001-clang-toolchain.patch - name: Build Debug - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -73,9 +81,9 @@ jobs: - name: Prepare Debug Artifacts run: | - scripts/prepare-sdk-x86-64.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_debug_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/ + tar czfhv $tag_debug.tar.gz flutter/engine/src/out/linux_debug_$arch/engine-sdk/ sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256 @@ -100,10 +108,10 @@ jobs: gh release edit "$tag_debug" --draft=false - name: Build Debug Unoptimized - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -123,9 +131,9 @@ jobs: - name: Prepare Debug Unoptimized Artifacts run: | - scripts/prepare-sdk-x86-64.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_debug_unopt_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/ + tar czfhv $tag_debug_unopt.tar.gz flutter/engine/src/out/linux_debug_unopt_$arch/engine-sdk/ sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256 @@ -150,10 +158,10 @@ jobs: gh release edit "$tag_debug_unopt" --draft=false - name: Build Release - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -172,9 +180,9 @@ jobs: - name: Prepare Release Artifacts run: | - scripts/prepare-sdk-x86-64.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_release_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/ + tar czfhv $tag_release.tar.gz flutter/engine/src/out/linux_release_$arch/engine-sdk/ sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256 @@ -199,10 +207,10 @@ jobs: gh release edit "$tag_release" --draft=false - name: Build Profile - working-directory: src + working-directory: flutter/engine/src run: | - export PATH=$PATH:$PWD/../depot_tools - export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython + export PATH=$PATH:$PWD/../../../depot_tools + export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython CLANG_ROOT=$(find -iname clang++) CLANG_ROOT=$(dirname $CLANG_ROOT) export CLANG_ROOT=$(dirname $CLANG_ROOT) @@ -221,9 +229,9 @@ jobs: - name: Prepare Profile Artifacts run: | - scripts/prepare-sdk-x86-64.sh src/out/linux_profile_$arch $PWD/src/build/linux/$target_sysroot + scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_profile_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot - tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/ + tar czfhv $tag_profile.tar.gz flutter/engine/src/out/linux_profile_$arch/engine-sdk/ sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256 diff --git a/patches/0001-clang-toolchain.patch b/patches/0001-clang-toolchain.patch index d3645dd..af863db 100644 --- a/patches/0001-clang-toolchain.patch +++ b/patches/0001-clang-toolchain.patch @@ -1,17 +1,17 @@ -From eb564c8be13a16158056890069deef5bad533529 Mon Sep 17 00:00:00 2001 +From 5e4bf78183f9bf30d093b3e766f36a5780f068ab Mon Sep 17 00:00:00 2001 From: Joel Winarske -Date: Mon, 26 Aug 2024 12:25:58 -0700 +Date: Thu, 13 Feb 2025 12:44:11 -0800 Subject: [PATCH] clang toolchain Signed-off-by: Joel Winarske --- - build/toolchain/custom/BUILD.gn | 8 ++++---- + engine/src/build/toolchain/custom/BUILD.gn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff --git a/build/toolchain/custom/BUILD.gn b/build/toolchain/custom/BUILD.gn -index 3da5f93..05de4d7 100644 ---- a/build/toolchain/custom/BUILD.gn -+++ b/build/toolchain/custom/BUILD.gn +diff --git a/engine/src/build/toolchain/custom/BUILD.gn b/engine/src/build/toolchain/custom/BUILD.gn +index 3da5f93026..05de4d7e3c 100644 +--- a/engine/src/build/toolchain/custom/BUILD.gn ++++ b/engine/src/build/toolchain/custom/BUILD.gn @@ -12,11 +12,11 @@ toolchain("custom") { # these values in our scope. cc = "${toolchain_bin}/clang"