From 2156ccb577f892bf25dea22a6d250beddbd4a2f7 Mon Sep 17 00:00:00 2001 From: Robo Date: Wed, 23 Jul 2025 17:05:30 +0900 Subject: [PATCH] ci: update llvmobjdump package as part of fix sync (#47858) --- .github/actions/fix-sync/action.yml | 4 +- patches/chromium/.patches | 1 - ...es_from_clang_toolchain_in_mac_build.patch | 105 ------------------ 3 files changed, 3 insertions(+), 107 deletions(-) delete mode 100644 patches/chromium/revert_use_more_binaries_from_clang_toolchain_in_mac_build.patch diff --git a/.github/actions/fix-sync/action.yml b/.github/actions/fix-sync/action.yml index 23bd710e20..3f49179d18 100644 --- a/.github/actions/fix-sync/action.yml +++ b/.github/actions/fix-sync/action.yml @@ -19,11 +19,13 @@ inputs: runs: using: "composite" steps: - - name: Fix clang + - name: Fix llvm toolchain shell: bash run : | rm -rf src/third_party/llvm-build python3 src/tools/clang/scripts/update.py + # Refs https://chromium-review.googlesource.com/c/chromium/src/+/6667681 + python3 src/tools/clang/scripts/update.py --package objdump - name: Fix esbuild uses: ./src/electron/.github/actions/cipd-install with: diff --git a/patches/chromium/.patches b/patches/chromium/.patches index b85b44a94e..a3a1baedc1 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -137,4 +137,3 @@ revert_update_siso-chromium_image.patch build_set_mac_sdk_minimum_to_10.patch fix_add_macos_memory_query_fallback_to_avoid_crash.patch fix_resolve_dynamic_background_material_update_issue_on_windows_11.patch -revert_use_more_binaries_from_clang_toolchain_in_mac_build.patch diff --git a/patches/chromium/revert_use_more_binaries_from_clang_toolchain_in_mac_build.patch b/patches/chromium/revert_use_more_binaries_from_clang_toolchain_in_mac_build.patch deleted file mode 100644 index 1d41e315b6..0000000000 --- a/patches/chromium/revert_use_more_binaries_from_clang_toolchain_in_mac_build.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Keeley Hammond -Date: Wed, 16 Jul 2025 20:19:56 -0700 -Subject: Revert "Use more binaries from clang toolchain in mac build" - -This reverts commit 17b850a9f8e913fb5e465d895f545b069def57d1. - -As part of the above commit, Chrome began bundling their otool -and nm binaries into third-party/llvm-build. These binaries are -not found in our current CI builds, and we'll need to modify -our actions to ensure they either persist or are added on MacOS. - -This patch can be removed when both otool and nm are correctly -persisted with third-party/llvm-build. - -diff --git a/DEPS b/DEPS -index 15a18361c468af57a286895448e39284d6d39bbe..559f7755314dd7dfbf74c89880a99b4a8e48ce74 100644 ---- a/DEPS -+++ b/DEPS -@@ -906,13 +906,6 @@ deps = { - 'generation': 1752145989568677, - 'condition': 'host_os == "mac" and host_cpu == "x64" and checkout_clang_coverage_tools', - }, -- { -- 'object_name': 'Mac/llvmobjdump-llvmorg-21-init-16348-gbd809ffb-13.tar.xz', -- 'sha256sum': 'fff3642ab8fbfffa4f5e8feda7b7f8ab7838099b2d0d1f5ce323a1d8aebf05ca', -- 'size_bytes': 5490072, -- 'generation': 1752145989091474, -- 'condition': 'host_os == "mac" and host_cpu == "x64"', -- }, - { - 'object_name': 'Mac_arm64/clang-llvmorg-21-init-16348-gbd809ffb-13.tar.xz', - 'sha256sum': '68460f5290547d101c4c9c2e4ea74b783159e553e90dad5b422f03f58d16d05c', -@@ -941,13 +934,6 @@ deps = { - 'generation': 1752146011858185, - 'condition': 'host_os == "mac" and host_cpu == "arm64" and checkout_clang_coverage_tools', - }, -- { -- 'object_name': 'Mac_arm64/llvmobjdump-llvmorg-21-init-16348-gbd809ffb-13.tar.xz', -- 'sha256sum': 'a8fddab5bd008eeac135e832fe327d15459bc7b1d2ca87a12fa4a9ba3c4be009', -- 'size_bytes': 5317004, -- 'generation': 1752146011233744, -- 'condition': 'host_os == "mac" and host_cpu == "arm64"', -- }, - { - 'object_name': 'Win/clang-llvmorg-21-init-16348-gbd809ffb-13.tar.xz', - 'sha256sum': '1021cc3231615a3556f691820014eb40dc93b4eb714bf4037dced002a454b763', -diff --git a/build/toolchain/apple/toolchain.gni b/build/toolchain/apple/toolchain.gni -index d3fdadf72eb0aa36ae9ae0d4324b61143bc55b66..d5210da1aa3bbda87ca540f67a1768dec70f3675 100644 ---- a/build/toolchain/apple/toolchain.gni -+++ b/build/toolchain/apple/toolchain.gni -@@ -115,9 +115,6 @@ template("single_apple_toolchain") { - host_toolchain = host_toolchain - } - -- # bin_path is only used in some builds. -- not_needed(invoker, [ "bin_path" ]) -- - # When the invoker has explicitly overridden cc_wrapper in the - # toolchain args, use those values, otherwise default to the global one. - # This works because the only reasonable override that toolchains might -@@ -213,7 +210,7 @@ template("single_apple_toolchain") { - linker_driver_args = "-Wcrl,driver,$ld" - - # Specify an explicit path for the strip binary. -- _strippath = "${prefix}llvm-strip" -+ _strippath = invoker.bin_path + "strip" - _installnametoolpath = "${prefix}llvm-install-name-tool" - linker_driver_args += " -Wcrl,strippath,${_strippath} -Wcrl,installnametoolpath,${_installnametoolpath}" - _enable_dsyms = enable_dsyms -@@ -496,8 +493,13 @@ template("single_apple_toolchain") { - # search path in /usr/bin are thin wrappers around xcrun, which requires a - # full CommandLineTools or Xcode install, and still may not choose the - # appropriate binary if there are multiple installs. -- nm = "${prefix}llvm-nm" -- otool = "${prefix}llvm-otool" -+ if (host_os == "mac") { -+ nm = invoker.bin_path + "nm" -+ otool = invoker.bin_path + "otool" -+ } else { -+ nm = "${prefix}llvm-nm" -+ otool = "${prefix}llvm-otool" -+ } - - link_command = "$linker_driver_env $linker_driver" - link_command += " -Wcrl,otoolpath,$otool -Wcrl,nmpath,$nm" -diff --git a/tools/clang/scripts/sync_deps.py b/tools/clang/scripts/sync_deps.py -index 79871b89f773f9d88c74832ad0488a8f7f3e2405..7c18b8f2ade0889d82251337f62574ed8533dc43 100755 ---- a/tools/clang/scripts/sync_deps.py -+++ b/tools/clang/scripts/sync_deps.py -@@ -34,14 +34,12 @@ CLANG_PLATFORM_TO_PACKAGE_FILES = { - 'clang-tidy', - 'clangd', - 'llvm-code-coverage', -- 'llvmobjdump', - ], - 'Mac_arm64': [ - 'clang', - 'clang-tidy', - 'clangd', - 'llvm-code-coverage', -- 'llvmobjdump', - ], - 'Win': [ - 'clang',