Loading .gitlab-ci.yml +5 −5 Original line number Diff line number Diff line Loading @@ -24,25 +24,25 @@ build-cromite-arm: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a arm - $CI_PROJECT_DIR/build.sh -c -t -s -a arm build-cromite-arm64: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a arm64 - $CI_PROJECT_DIR/build.sh -c -t -s -a arm64 build-cromite-x86: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a x86 - $CI_PROJECT_DIR/build.sh -c -t -s -a x86 build-cromite-x64: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a x64 - $CI_PROJECT_DIR/build.sh -c -t -s -a x64 .build-filters: image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:slim-latest Loading build.sh +210 −205 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ chromium_url=https://github.com/chromium/chromium.git clean=0 gsync=0 history=1 trichrome=0 patchonly=0 arch="" Loading @@ -27,6 +28,7 @@ usage() { echo " -s Sync source" echo " -h Sync without history" echo " -p Apply patches - Only after synced" echo " -t Build trichrome chromium, webview and library" echo exit 1 } Loading @@ -34,7 +36,7 @@ usage() { build() { echo ">> [$(date)] Head commit: $(git show -s --format=%s)" apks="TrichromeChrome TrichromeLibrary TrichromeWebView TrichromeChrome6432 \ TrichromeLibrary6432 TrichromeWebView6432" TrichromeLibrary6432 TrichromeWebView6432 ChromePublic SystemWebView" build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" " apk_arch=${1} Loading @@ -60,8 +62,10 @@ build() { build_args+=' trichrome_certdigest="c8a2e9bccf597c2fb6dc66bee293fc13f2fc47ec77bc6b2b0d52c11f51192ab8"' echo ">> [$(date)] Building chromium $chromium_version for $1" gn gen "out/$1" --args="$build_args" if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then gn gen "out/$1" --fail-on-unused-args --args="$build_args" if [[ $trichrome -eq 0 ]]; then build_targets="chrome_public_apk system_webview_apk" elif [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then build_targets="trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk" else build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk" Loading Loading @@ -221,7 +225,7 @@ init_repo() { fi } while getopts ":a:cur:shp" opt; do while getopts ":a:cur:shpt" opt; do case $opt in a) arch="$OPTARG" ;; c) clean=1 ;; Loading @@ -229,6 +233,7 @@ while getopts ":a:cur:shp" opt; do s) gsync=1 ;; h) history=0 ;; p) patchonly=1 ;; t) trichrome=1 ;; :) echo "Option -$OPTARG requires an argument" echo Loading build/browser.gn_args +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ enable_hangout_services_extension=false enable_iterator_debugging=false enable_mdns=false enable_mse_mpeg2ts_stream_parser=true enable_nacl=false enable_openxr=false enable_platform_dolby_vision=false enable_platform_dts_audio=false Loading Loading @@ -55,5 +54,5 @@ use_thin_lto=false use_v8_context_snapshot=false chrome_public_manifest_package = "foundation.e.browser" trichrome_library_package = "org.chromium.trichromelibrary" trichrome_library_package = "foundation.e.trichromelibrary" system_webview_package_name="com.android.webview" build/cromite_patches/Compress-libchrome-to-free-up-some-space.patch 0 → 100644 +24 −0 Original line number Diff line number Diff line From: uazo <uazo@users.noreply.github.com> Date: Wed, 19 Jul 2023 09:32:36 +0000 Subject: Compress libchrome to free up some space upstream removed ModernLinker support for developer build (apk releases). see https://bugs.chromium.org/p/chromium/issues/detail?id=1383210 License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/android/chrome_public_apk_tmpl.gni | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni @@ -677,6 +677,7 @@ template("chrome_common_apk_or_module_tmpl") { [ "//components/crash/core/app:chrome_crashpad_handler_named_as_so" ] loadable_modules += [ "$root_out_dir/libchrome_crashpad_handler.so" ] library_always_compress += [ "libchrome_crashpad_handler.so" ] + library_always_compress += [ "libchrome.so" ] } else if (!_is_trichrome) { # Crashpad trampoline lives in TrichromeLibrary.apk. # https://chromium.googlesource.com/chromium/src/+/main/docs/android_native_libraries.md#Crashpad-Packaging -- build/cromite_patches_list.txt +1 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ Disable-Feeback-Collector.patch Fix-chromium-build-bugs.patch Disable-privacy-issues-in-password-manager.patch Use-browser-navigation-handler.patch Compress-libchrome-to-free-up-some-space.patch Disable-Android-Tab-Declutter.patch Temp-disable-UseContextSnapshot.patch Loading Loading
.gitlab-ci.yml +5 −5 Original line number Diff line number Diff line Loading @@ -24,25 +24,25 @@ build-cromite-arm: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a arm - $CI_PROJECT_DIR/build.sh -c -t -s -a arm build-cromite-arm64: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a arm64 - $CI_PROJECT_DIR/build.sh -c -t -s -a arm64 build-cromite-x86: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a x86 - $CI_PROJECT_DIR/build.sh -c -t -s -a x86 build-cromite-x64: stage: build extends: .build-cromite script: - $CI_PROJECT_DIR/build.sh -c -s -a x64 - $CI_PROJECT_DIR/build.sh -c -t -s -a x64 .build-filters: image: registry.gitlab.e.foundation/e/os/docker-android-apps-cicd:slim-latest Loading
build.sh +210 −205 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ chromium_url=https://github.com/chromium/chromium.git clean=0 gsync=0 history=1 trichrome=0 patchonly=0 arch="" Loading @@ -27,6 +28,7 @@ usage() { echo " -s Sync source" echo " -h Sync without history" echo " -p Apply patches - Only after synced" echo " -t Build trichrome chromium, webview and library" echo exit 1 } Loading @@ -34,7 +36,7 @@ usage() { build() { echo ">> [$(date)] Head commit: $(git show -s --format=%s)" apks="TrichromeChrome TrichromeLibrary TrichromeWebView TrichromeChrome6432 \ TrichromeLibrary6432 TrichromeWebView6432" TrichromeLibrary6432 TrichromeWebView6432 ChromePublic SystemWebView" build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" " apk_arch=${1} Loading @@ -60,8 +62,10 @@ build() { build_args+=' trichrome_certdigest="c8a2e9bccf597c2fb6dc66bee293fc13f2fc47ec77bc6b2b0d52c11f51192ab8"' echo ">> [$(date)] Building chromium $chromium_version for $1" gn gen "out/$1" --args="$build_args" if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then gn gen "out/$1" --fail-on-unused-args --args="$build_args" if [[ $trichrome -eq 0 ]]; then build_targets="chrome_public_apk system_webview_apk" elif [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then build_targets="trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk" else build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk" Loading Loading @@ -221,7 +225,7 @@ init_repo() { fi } while getopts ":a:cur:shp" opt; do while getopts ":a:cur:shpt" opt; do case $opt in a) arch="$OPTARG" ;; c) clean=1 ;; Loading @@ -229,6 +233,7 @@ while getopts ":a:cur:shp" opt; do s) gsync=1 ;; h) history=0 ;; p) patchonly=1 ;; t) trichrome=1 ;; :) echo "Option -$OPTARG requires an argument" echo Loading
build/browser.gn_args +1 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ enable_hangout_services_extension=false enable_iterator_debugging=false enable_mdns=false enable_mse_mpeg2ts_stream_parser=true enable_nacl=false enable_openxr=false enable_platform_dolby_vision=false enable_platform_dts_audio=false Loading Loading @@ -55,5 +54,5 @@ use_thin_lto=false use_v8_context_snapshot=false chrome_public_manifest_package = "foundation.e.browser" trichrome_library_package = "org.chromium.trichromelibrary" trichrome_library_package = "foundation.e.trichromelibrary" system_webview_package_name="com.android.webview"
build/cromite_patches/Compress-libchrome-to-free-up-some-space.patch 0 → 100644 +24 −0 Original line number Diff line number Diff line From: uazo <uazo@users.noreply.github.com> Date: Wed, 19 Jul 2023 09:32:36 +0000 Subject: Compress libchrome to free up some space upstream removed ModernLinker support for developer build (apk releases). see https://bugs.chromium.org/p/chromium/issues/detail?id=1383210 License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/android/chrome_public_apk_tmpl.gni | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni @@ -677,6 +677,7 @@ template("chrome_common_apk_or_module_tmpl") { [ "//components/crash/core/app:chrome_crashpad_handler_named_as_so" ] loadable_modules += [ "$root_out_dir/libchrome_crashpad_handler.so" ] library_always_compress += [ "libchrome_crashpad_handler.so" ] + library_always_compress += [ "libchrome.so" ] } else if (!_is_trichrome) { # Crashpad trampoline lives in TrichromeLibrary.apk. # https://chromium.googlesource.com/chromium/src/+/main/docs/android_native_libraries.md#Crashpad-Packaging --
build/cromite_patches_list.txt +1 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,7 @@ Disable-Feeback-Collector.patch Fix-chromium-build-bugs.patch Disable-privacy-issues-in-password-manager.patch Use-browser-navigation-handler.patch Compress-libchrome-to-free-up-some-space.patch Disable-Android-Tab-Declutter.patch Temp-disable-UseContextSnapshot.patch Loading