From 173773c3cf7f0a261798438753aef1f399ba615c Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Wed, 14 Feb 2024 15:27:13 -0600 Subject: [PATCH] M121 Final? --- arm/third_party/libaom/cmake_update.sh | 4 ++-- arm/third_party/libvpx/BUILD.gn | 2 +- docs/BUILDING.md | 1 + other/AVX2/v8/BUILD.gn | 4 ++-- other/CrOS/v8/BUILD.gn | 6 +++--- other/build_ffmpeg.py | 2 +- src/third_party/blink/common/features.cc | 9 ++++++--- src/tools/pgo/generate_profile.py | 6 +++--- src/v8/BUILD.gn | 4 ++-- 9 files changed, 21 insertions(+), 17 deletions(-) diff --git a/arm/third_party/libaom/cmake_update.sh b/arm/third_party/libaom/cmake_update.sh index 63564a2a..ffeca417 100755 --- a/arm/third_party/libaom/cmake_update.sh +++ b/arm/third_party/libaom/cmake_update.sh @@ -203,6 +203,6 @@ convert_to_windows "${CFG}/win/arm64-cpu-detect/config/aom_config.h" update_readme # git cl format > /dev/null \ - echo "ERROR: 'git cl format' failed. Please run 'git cl format' manually." - +# || echo "WARNING: 'git cl format' failed. Please run 'git cl format' manually." + echo "NOTE: 'You may want to run \`git cl format\` manually." cleanup diff --git a/arm/third_party/libvpx/BUILD.gn b/arm/third_party/libvpx/BUILD.gn index d3ab830b..bc449c32 100644 --- a/arm/third_party/libvpx/BUILD.gn +++ b/arm/third_party/libvpx/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 20124 The Chromium Authors and Alex313031 +# Copyright 2024 The Chromium Authors and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/docs/BUILDING.md b/docs/BUILDING.md index 96d87426..e33c1310 100644 --- a/docs/BUILDING.md +++ b/docs/BUILDING.md @@ -122,6 +122,7 @@ to enable Sync. ## Setting up the build First, we need to run `./trunk.sh` (in the root of the Thorium repo.) This will Rebase/Sync the Chromium repo, and revert it to stock Chromium. +It will also fetch all the tags/branches, which is needed for the version.sh script. It should be used before every seperate build. See the [Updating](#updating) section. __IMPORTANT__ diff --git a/other/AVX2/v8/BUILD.gn b/other/AVX2/v8/BUILD.gn index ab751d3e..3197d0d9 100644 --- a/other/AVX2/v8/BUILD.gn +++ b/other/AVX2/v8/BUILD.gn @@ -1414,8 +1414,8 @@ config("toolchain") { } if (is_linux || is_chromeos) { # Full optimization for V8. - cflags += [ "-O3", "-mavx2", "-mfma", "-maes" ] - ldflags += [ "-Wl,-O3", "-mavx2", "-mfma", "-maes" ] + cflags += [ "-O3", "-msse3", "-mssse3", "-msse4.1", "-msse4.2", "-mavx", "-maes", "-mavx2", "-mfma" ] + ldflags += [ "-Wl,-O3", "-msse3", "-mssse3", "-msse4.1", "-msse4.2", "-mavx", "-maes", "-mavx2", "-mfma" ] } } if (is_android && v8_android_log_stdout) { diff --git a/other/CrOS/v8/BUILD.gn b/other/CrOS/v8/BUILD.gn index 1f8f8a39..91514d13 100644 --- a/other/CrOS/v8/BUILD.gn +++ b/other/CrOS/v8/BUILD.gn @@ -1409,13 +1409,13 @@ config("toolchain") { # Increase the initial stack size. The default is 1MB, this is 2MB. This # applies only to executables and shared libraries produced by V8 since # ldflags are not pushed to dependants. - cflags += [ "/O2", "-msse4.1" ] + cflags += [ "/O2", "-msse3", "-mssse3", "-msse4.1" ] ldflags += [ "/STACK:2097152" ] } if (is_linux || is_chromeos) { # Full optimization for V8. - cflags += [ "-O3", "-msse4.1" ] - ldflags += [ "-Wl,-O3", "-msse4.1" ] + cflags += [ "-O3", "-msse3", "-mssse3", "-msse4.1" ] + ldflags += [ "-Wl,-O3", "-msse3", "-mssse3", "-msse4.1" ] } } if (is_android && v8_android_log_stdout) { diff --git a/other/build_ffmpeg.py b/other/build_ffmpeg.py index 4be14cb4..75aeb529 100755 --- a/other/build_ffmpeg.py +++ b/other/build_ffmpeg.py @@ -1015,7 +1015,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs, configure_flags['Chrome'].extend([ '--enable-decoder=aac,h264,mp3,eac3,ac3,hevc,mpeg4,mpegvideo,mp2,mp1,flac', '--enable-demuxer=aac,mp3,mov,dtshd,dts,avi,mpegvideo,m4v,eac3,ac3,h264,vc1,flac', - '--enable-parser=aac,h264,mpegaudio,mpeg4video,mpegvideo,eac3,ac3,h261,vc1,h263,flac', + '--enable-parser=aac,h264,hevc,mpegaudio,mpeg4video,mpegvideo,eac3,ac3,h261,vc1,h263,flac', ]) # Google ChromeOS specific configuration. diff --git a/src/third_party/blink/common/features.cc b/src/third_party/blink/common/features.cc index af91698a..f7a18b13 100644 --- a/src/third_party/blink/common/features.cc +++ b/src/third_party/blink/common/features.cc @@ -310,9 +310,10 @@ const base::FeatureParam kBoostImagePriorityTightMediumLimit{ // https://github.com/patcg-individual-drafts/topics // Kill switch for the Topics API. +// Disabled by Alex313031 BASE_FEATURE(kBrowsingTopics, "BrowsingTopics", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); // If enabled, the check for whether the IP address is publicly routable will be // bypassed when determining the eligibility for a page to be included in topics @@ -1010,9 +1011,10 @@ const char kIntensiveWakeUpThrottling_GracePeriodSeconds_Name[] = // Kill switch for the Interest Group API, i.e. if disabled, the // API exposure will be disabled regardless of the OT config. +// Disabled by Alex313031 BASE_FEATURE(kInterestGroupStorage, "InterestGroupStorage", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); // TODO(crbug.com/1197209): Adjust these limits in response to usage. const base::FeatureParam kInterestGroupStorageMaxOwners{ &kInterestGroupStorage, "max_owners", 1000}; @@ -1492,9 +1494,10 @@ BASE_FEATURE(kPrivacySandboxAdsAPIs, // Enables the Private Aggregation API. Note that this API also requires the // `kPrivacySandboxAggregationService` to be enabled to successfully send // reports. +// Disabled by Alex313031 BASE_FEATURE(kPrivateAggregationApi, "PrivateAggregationApi", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); // Selectively allows the JavaScript API to be disabled in just one of the // contexts. The Protected Audience param's name has not been updated (from diff --git a/src/tools/pgo/generate_profile.py b/src/tools/pgo/generate_profile.py index ba05bbfc..0741e12c 100755 --- a/src/tools/pgo/generate_profile.py +++ b/src/tools/pgo/generate_profile.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright 2024 The Chromium Authors +# Copyright 2024 The Chromium Authors, Midzer, and Alex313031 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Runs benchmarks as described in docs/pgo.md, and similar to the PGO bots. @@ -95,7 +95,7 @@ def main(): # See also https://crbug.com/1478279 builddir = os.path.realpath(args.builddir) if sys.platform == 'darwin': - chrome_path = f'{builddir}/Chromium.app/Contents/MacOS/Chromium' + chrome_path = f'{builddir}/Thorium.app/Contents/MacOS/Thorium' elif args.android_browser: chrome_path = None if not args.android_device_path: @@ -108,7 +108,7 @@ def main(): args.android_device_path = ( f'/data/data/{package}/cache/pgo_profiles') else: - chrome_path = f'{builddir}/chrome' + exe_ext + chrome_path = f'{builddir}/thorium' + exe_ext profiledir = f'{builddir}/profile' def run_benchmark(benchmark_args): diff --git a/src/v8/BUILD.gn b/src/v8/BUILD.gn index 3efa4cd7..9c1e22cc 100644 --- a/src/v8/BUILD.gn +++ b/src/v8/BUILD.gn @@ -1414,8 +1414,8 @@ config("toolchain") { } if (is_linux || is_chromeos) { # Full optimization for V8. - cflags += [ "-O3", "-mavx", "-maes" ] - ldflags += [ "-Wl,-O3", "-mavx", "-maes" ] + cflags += [ "-O3", "-msse3", "-mssse3", "-msse4.1", "-msse4.2", "-mavx", "-maes" ] + ldflags += [ "-Wl,-O3", "-msse3", "-mssse3", "-msse4.1", "-msse4.2", "-mavx", "-maes" ] } } if (is_android && v8_android_log_stdout) {