Skip to content

Commit

Permalink
devel/electron27: Fix build with ninja 1.12.0
Browse files Browse the repository at this point in the history
Fix race conditions where generated headers are not created before they
are needed in the build.

Ninja 1.12.0 removed the `-w dupbuild` option and the default behavior
is now equivalent to passing `-w dupbuild=err` in previous versions.

PR:		278693
Approved by:	portmgr (blanket)
  • Loading branch information
BSDKaffee committed May 15, 2024
1 parent 4da1e74 commit a80c934
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
16 changes: 13 additions & 3 deletions devel/electron27/files/patch-net_dns_BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- net/dns/BUILD.gn.orig 2023-08-20 00:00:07 UTC
--- net/dns/BUILD.gn.orig 2024-05-15 03:41:02 UTC
+++ net/dns/BUILD.gn
@@ -128,7 +128,7 @@ source_set("dns") {
"dns_config_service_android.cc",
Expand All @@ -9,15 +9,25 @@
sources += [
"dns_config_service_linux.cc",
"dns_config_service_linux.h",
@@ -169,6 +169,7 @@ source_set("dns") {
@@ -162,6 +162,9 @@ source_set("dns") {
}

deps = [ "//net:net_deps" ]
+ if (is_bsd) {
+ deps += [ "//components/services/screen_ai/buildflags" ]
+ }

public_deps = [
":dns_client",
@@ -169,6 +172,7 @@ source_set("dns") {
":host_resolver_manager",
":mdns_client",
"//net:net_public_deps",
+ "//printing/buildflags",
]

allow_circular_includes_from = [
@@ -436,9 +437,9 @@ source_set("tests") {
@@ -436,9 +440,9 @@ source_set("tests") {

if (is_android) {
sources += [ "dns_config_service_android_unittest.cc" ]
Expand Down
11 changes: 11 additions & 0 deletions devel/electron27/files/patch-tools_gn_bootstrap_bootstrap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- tools/gn/bootstrap/bootstrap.py.orig 2023-11-01 19:30:06 UTC
+++ tools/gn/bootstrap/bootstrap.py
@@ -122,7 +122,7 @@ def main(argv):
shutil.copy2(
os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
- cmd = [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']
+ cmd = [ninja_binary, '-C', gn_build_dir, 'gn']
if options.jobs:
cmd += ['-j', str(options.jobs)]
subprocess.check_call(cmd)

0 comments on commit a80c934

Please sign in to comment.