mirror of https://github.com/electron/electron
85 lines
3.1 KiB
Diff
85 lines
3.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Attard <sattard@slack-corp.com>
|
|
Date: Thu, 27 May 2021 17:21:07 -0700
|
|
Subject: build: do not depend on packed_resource_integrity
|
|
|
|
This ensures we do not depend on a target that does not exist when
|
|
building Electron, electron generates its own .pak files via
|
|
electron_repack and therefore this integrity target which is generated
|
|
by the chrome_paks target does not exist. This can not be upstreamed,
|
|
if we ever align our .pak file generation with Chrome we can remove this
|
|
patch.
|
|
|
|
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
|
index a472e9a72dc5c04e92f007e1740a4b6aaf54f63b..b7f8ae82d540ea373972678f3cd93f8d41fc8d99 100644
|
|
--- a/chrome/BUILD.gn
|
|
+++ b/chrome/BUILD.gn
|
|
@@ -189,11 +189,16 @@ if (!is_android && !is_mac) {
|
|
"common/crash_keys.h",
|
|
]
|
|
|
|
+ if (!is_electron_build) {
|
|
+ deps = [
|
|
+ ":packed_resources_integrity_header",
|
|
+ ]
|
|
+ }
|
|
+
|
|
deps += [
|
|
":chrome_dll",
|
|
":chrome_exe_version",
|
|
":copy_first_run",
|
|
- ":packed_resources_integrity_header",
|
|
":visual_elements_resources",
|
|
"//base",
|
|
"//build:branding_buildflags",
|
|
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
|
index 26c26eafb1a87609d1c045c9adbdb3048afdb210..77806b6c5ea44408d3ab6ef853b410f2a6c31ce9 100644
|
|
--- a/chrome/browser/BUILD.gn
|
|
+++ b/chrome/browser/BUILD.gn
|
|
@@ -4868,7 +4868,7 @@ static_library("browser") {
|
|
|
|
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
|
# than here in :chrome_dll.
|
|
- if (!is_win) {
|
|
+ if (!is_win && !is_electron_build) {
|
|
deps += [ "//chrome:packed_resources_integrity_header" ]
|
|
sources += [ "certificate_viewer_stub.cc" ]
|
|
}
|
|
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
|
index 2ffd0dbb0bccfa7fdc393a41fb4474288c1621c7..8839dc3463584c537ff7795999f4b10f1dd48d7a 100644
|
|
--- a/chrome/test/BUILD.gn
|
|
+++ b/chrome/test/BUILD.gn
|
|
@@ -7265,9 +7265,12 @@ test("unit_tests") {
|
|
"//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2",
|
|
]
|
|
|
|
+ if (!is_electron_build) {
|
|
+ deps += [ "//chrome:packed_resources_integrity_header" ]
|
|
+ }
|
|
+
|
|
deps += [
|
|
"//chrome:other_version",
|
|
- "//chrome:packed_resources_integrity_header",
|
|
"//chrome//services/util_win:unit_tests",
|
|
"//chrome/app:chrome_dll_resources",
|
|
"//chrome/app:win_unit_tests",
|
|
@@ -8258,6 +8261,10 @@ test("unit_tests") {
|
|
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
|
]
|
|
|
|
+ if (!is_electron_build) {
|
|
+ deps += [ "//chrome:packed_resources_integrity_header" ]
|
|
+ }
|
|
+
|
|
sources += [
|
|
# The importer code is not used on Android.
|
|
"../common/importer/firefox_importer_utils_unittest.cc",
|
|
@@ -8329,7 +8336,6 @@ test("unit_tests") {
|
|
}
|
|
|
|
deps += [
|
|
- "//chrome:packed_resources_integrity_header",
|
|
"//chrome/browser/apps:icon_standardizer",
|
|
"//chrome/browser/apps/app_service",
|
|
"//chrome/browser/apps/app_service:app_registry_cache_waiter",
|