mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: revert clang revert (#37934)
* build: revert clang revert * ci: use newer clang for 32-bit Linux ARM Fixes crash on compiling skia/skia/SkPatchUtils.cpp
This commit is contained in:
committed by
GitHub
parent
2e7bfb4e0d
commit
63388b3616
@@ -108,7 +108,7 @@ env-unittests: &env-unittests
|
||||
TESTS_CONFIG: src/electron/spec/configs/unittests.yml
|
||||
|
||||
env-arm: &env-arm
|
||||
GN_EXTRA_ARGS: 'target_cpu = "arm"'
|
||||
GN_EXTRA_ARGS: 'target_cpu = "arm" clang_use_chrome_plugins = false'
|
||||
MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm
|
||||
BUILD_NATIVE_MKSNAPSHOT: 1
|
||||
TARGET_ARCH: arm
|
||||
@@ -524,6 +524,18 @@ step-fix-sync: &step-fix-sync
|
||||
mv .git/config.backup .git/config
|
||||
git fetch
|
||||
|
||||
step-fix-clang: &step-fix-clang
|
||||
run:
|
||||
name: Fix Clang on 32-bit Linux ARM
|
||||
command: |
|
||||
if [ "$TARGET_ARCH" == "arm" ]; then
|
||||
# The following custom clang needed on 32-bit Linux ARM due to https://crbug.com/1431201.
|
||||
# Once https://crbug.com/1425409 has been resolved this workaround can be remove
|
||||
cd src/third_party/llvm-build/Release+Asserts
|
||||
curl -O https://dev-cdn.electronjs.org/clang/clang-llvmorg-17-init-4759-g547e3456-2.tar.xz
|
||||
tar xvf clang-llvmorg-17-init-4759-g547e3456-2.tar.xz
|
||||
fi
|
||||
|
||||
step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac
|
||||
run:
|
||||
name: Import and trust self-signed codesigning cert on MacOS
|
||||
@@ -1056,6 +1068,7 @@ commands:
|
||||
default: true
|
||||
steps:
|
||||
- *step-gn-gen-default
|
||||
- *step-fix-clang
|
||||
- ninja_build_electron:
|
||||
clean-prebuilt-snapshot: false
|
||||
build-type: << parameters.build-type >>
|
||||
@@ -1598,6 +1611,7 @@ commands:
|
||||
- *step-setup-goma-for-build
|
||||
- *step-wait-for-goma
|
||||
- *step-gn-gen-default
|
||||
- *step-fix-clang
|
||||
|
||||
# Electron app
|
||||
- ninja_build_electron:
|
||||
|
||||
@@ -126,4 +126,3 @@ expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
|
||||
chore_patch_out_profile_methods_in_profile_selections_cc.patch
|
||||
fix_x11_window_restore_minimized_maximized_window.patch
|
||||
chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
|
||||
revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: John Kleinschmidt <jkleinsc@electronjs.org>
|
||||
Date: Wed, 8 Mar 2023 14:27:41 -0500
|
||||
Subject: Revert "Roll clang+rust llvmorg-16-init-17653-g39da55e8-3 :
|
||||
llvmorg-17-init-2082-g6d4a674a-1 / [skipping Rust]"
|
||||
|
||||
This reverts commit eb840ac593ad7af941acf510ea6ce84c48bde748.
|
||||
|
||||
diff --git a/build/toolchain/toolchain.gni b/build/toolchain/toolchain.gni
|
||||
index 7ddeb126840f554955f6339a54756e21382d5a7d..c9558ee8b59f2824df9f4f103099a9d360735919 100644
|
||||
--- a/build/toolchain/toolchain.gni
|
||||
+++ b/build/toolchain/toolchain.gni
|
||||
@@ -38,7 +38,12 @@ if (generate_linker_map) {
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
- clang_version = "17"
|
||||
+ if (llvm_force_head_revision) {
|
||||
+ clang_version = "17"
|
||||
+ } else {
|
||||
+ # TODO(crbug.com/1410101): Remove in next Clang roll.
|
||||
+ clang_version = "16"
|
||||
+ }
|
||||
}
|
||||
|
||||
# Extension for shared library files (including leading dot).
|
||||
diff --git a/tools/clang/scripts/build.py b/tools/clang/scripts/build.py
|
||||
index b686912d6fb5775731b07217c964dc9f0ade8309..d78a85422fcbf3afb909d5195fad2942058246f8 100755
|
||||
--- a/tools/clang/scripts/build.py
|
||||
+++ b/tools/clang/scripts/build.py
|
||||
@@ -578,6 +578,15 @@ def main():
|
||||
|
||||
global CLANG_REVISION, PACKAGE_VERSION, LLVM_BUILD_DIR
|
||||
|
||||
+ # TODO(crbug.com/1410101): Remove in next Clang roll.
|
||||
+ if args.llvm_force_head_revision:
|
||||
+ global RELEASE_VERSION
|
||||
+ RELEASE_VERSION = '17'
|
||||
+ old_lib_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', '16.0.0')
|
||||
+ if (os.path.isdir(old_lib_dir)):
|
||||
+ print('Removing old lib dir: ', old_lib_dir)
|
||||
+ RmTree(old_lib_dir)
|
||||
+
|
||||
if (args.pgo or args.thinlto) and not args.bootstrap:
|
||||
print('--pgo/--thinlto requires --bootstrap')
|
||||
return 1
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index 44dfe2f1f6df6397ec4c2684f682ab458f357f54..106849006b66b157da92df2bbf2f7016d56dc375 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -35,11 +35,12 @@ import zlib
|
||||
# https://chromium.googlesource.com/chromium/src/+/main/docs/updating_clang.md
|
||||
# Reverting problematic clang rolls is safe, though.
|
||||
# This is the output of `git describe` and is usable as a commit-ish.
|
||||
-CLANG_REVISION = 'llvmorg-17-init-2387-g68e81d7e'
|
||||
-CLANG_SUB_REVISION = 1
|
||||
+CLANG_REVISION = 'llvmorg-16-init-17653-g39da55e8'
|
||||
+CLANG_SUB_REVISION = 3
|
||||
|
||||
PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
|
||||
-RELEASE_VERSION = '17'
|
||||
+RELEASE_VERSION = '16'
|
||||
+# TODO(crbug.com/1410101): Bump to 17 in next Clang roll.
|
||||
|
||||
CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE',
|
||||
'https://commondatastorage.googleapis.com/chromium-browser-clang')
|
||||
@@ -332,6 +333,11 @@ def main():
|
||||
help='Verify that clang has the passed-in version.')
|
||||
args = parser.parse_args()
|
||||
|
||||
+ # TODO(crbug.com/1410101): Remove in next Clang roll.
|
||||
+ if args.llvm_force_head_revision:
|
||||
+ global RELEASE_VERSION
|
||||
+ RELEASE_VERSION = '17'
|
||||
+
|
||||
if args.verify_version and args.verify_version != RELEASE_VERSION:
|
||||
print('RELEASE_VERSION is %s but --verify-version argument was %s.' % (
|
||||
RELEASE_VERSION, args.verify_version))
|
||||
Reference in New Issue
Block a user