chromium{Beta,Dev}: Disable PGO to "fix" a build error

This also fixes/improves versionRange because the ungoogled-chromium
version will lag behind the Chromium version.
This commit is contained in:
Michael Weiss 2021-01-28 22:06:23 +01:00
parent d226cb4541
commit 241db3bb01
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83

View File

@ -101,12 +101,14 @@ let
buildPath = "out/${buildType}"; buildPath = "out/${buildType}";
libExecPath = "$out/libexec/${packageName}"; libExecPath = "$out/libexec/${packageName}";
chromiumVersionAtLeast = min-version:
versionAtLeast upstream-info.version min-version;
versionRange = min-version: upto-version: versionRange = min-version: upto-version:
let inherit (upstream-info) version; let inherit (upstream-info) version;
result = versionAtLeast version min-version && versionOlder version upto-version; result = versionAtLeast version min-version && versionOlder version upto-version;
stable-version = (importJSON ./upstream-info.json).stable.version; ungoogled-version = (importJSON ./upstream-info.json).ungoogled.version;
in if versionAtLeast stable-version upto-version in if versionAtLeast ungoogled-version upto-version
then warn "chromium: stable version ${stable-version} is newer than a patchset bounded at ${upto-version}. You can safely delete it." then warn "chromium: ungoogled version ${ungoogled-version} is newer than a patchset bounded at ${upto-version}. You can safely delete it."
result result
else result; else result;
@ -269,6 +271,10 @@ let
use_system_minigbm = true; use_system_minigbm = true;
use_system_libdrm = true; use_system_libdrm = true;
system_wayland_scanner_path = "${wayland}/bin/wayland-scanner"; system_wayland_scanner_path = "${wayland}/bin/wayland-scanner";
} // optionalAttrs (chromiumVersionAtLeast "89") {
# Disable PGO (defaults to 2 since M89) because it fails without additional changes:
# error: Could not read profile ../../chrome/build/pgo_profiles/chrome-linux-master-1610647094-405a32bcf15e5a84949640f99f84a5b9f61e2f2e.profdata: Unsupported instrumentation profile format version
chrome_pgo_phase = 0;
} // optionalAttrs ungoogled { } // optionalAttrs ungoogled {
chrome_pgo_phase = 0; chrome_pgo_phase = 0;
enable_hangout_services_extension = false; enable_hangout_services_extension = false;