From d9d41b2e01f544bcd9700bb530741bf538778e22 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 2 Nov 2021 10:36:51 -0700 Subject: [PATCH] devops: fix archiving of Chromium Linux Arm64 build (#9980) --- browser_patches/chromium/archive.sh | 6 +++++- browser_patches/chromium/compute_files_to_archive.js | 10 +++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/browser_patches/chromium/archive.sh b/browser_patches/chromium/archive.sh index 041990acd1..48fde64f34 100755 --- a/browser_patches/chromium/archive.sh +++ b/browser_patches/chromium/archive.sh @@ -64,10 +64,14 @@ function archive_compiled_chromium() { CHROMIUM_FOLDER_NAME="chrome-mac" IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($(node "${SCRIPT_PATH}/compute_files_to_archive.js" "${CR_CHECKOUT_PATH}/src/infra/archive_config/mac-archive-rel.json")) unset IFS - elif [[ $1 == "--compile-linux"* ]]; then + elif [[ $1 == "--compile-linux" ]]; then CHROMIUM_FOLDER_NAME="chrome-linux" IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($(node "${SCRIPT_PATH}/compute_files_to_archive.js" "${CR_CHECKOUT_PATH}/src/infra/archive_config/linux-archive-rel.json")) unset IFS + elif [[ $1 == "--compile-linux-arm64" ]]; then + CHROMIUM_FOLDER_NAME="chrome-linux" + IFS=$'\n' CHROMIUM_FILES_TO_ARCHIVE=($(node "${SCRIPT_PATH}/compute_files_to_archive.js" "${CR_CHECKOUT_PATH}/src/infra/archive_config/linux-archive-rel.json" --linux-arm64)) + unset IFS elif [[ $1 == "--compile-win64" ]]; then CHROMIUM_FOLDER_NAME="chrome-win" IFS=$'\n\r' CHROMIUM_FILES_TO_ARCHIVE=($(node "${SCRIPT_PATH}/compute_files_to_archive.js" "${CR_CHECKOUT_PATH}/src/infra/archive_config/win-archive-rel.json")) diff --git a/browser_patches/chromium/compute_files_to_archive.js b/browser_patches/chromium/compute_files_to_archive.js index 4bdfdc045e..01b4a4e721 100644 --- a/browser_patches/chromium/compute_files_to_archive.js +++ b/browser_patches/chromium/compute_files_to_archive.js @@ -13,10 +13,18 @@ const excludeList = new Set([ 'interactive_ui_tests.exe', ]); +// There is no upstream configuration for packaging Linux Arm64 builds, +// so we build one by replacing x86_64-specific nacl binary with arm one. +const replaceMap = { + '--linux-arm64': { + 'nacl_irt_x86_64.nexe': 'nacl_irt_arm.nexe', + }, +}[process.argv[3]] || {}; + const entries = [ ...(config.files || []), ...(config.dirs || []), -].filter(entry => !excludeList.has(entry)); +].filter(entry => !excludeList.has(entry)).map(entry => replaceMap[entry] || entry); for (const entry of entries) console.log(entry);