Skip to content

Commit ed55fd4

Browse files
committed
Remove V8 patch for macOS warning
The issue has been fixed upstream in https://chromium-review.googlesource.com/c/v8/v8/+/4218733.
1 parent 9ce41e4 commit ed55fd4

9 files changed

+25
-59
lines changed

WORKSPACE

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,13 @@ git_repository(
271271
"//:patches/v8/0002-Allow-manually-setting-ValueSerializer-format-versio.patch",
272272
"//:patches/v8/0003-Make-icudata-target-public.patch",
273273
"//:patches/v8/0004-Add-ArrayBuffer-MaybeNew.patch",
274-
"//:patches/v8/0005-Allow-compiling-on-macOS-catalina-and-ventura.patch",
275-
"//:patches/v8/0006-Fix-v8-code_generator-imports.patch",
276-
"//:patches/v8/0007-Allow-Windows-builds-under-Bazel.patch",
277-
"//:patches/v8/0008-Disable-bazel-whole-archive-build.patch",
278-
"//:patches/v8/0009-Make-v8-Locker-automatically-call-isolate-Enter.patch",
279-
"//:patches/v8/0010-Add-an-API-to-capture-and-restore-the-cage-base-poin.patch",
280-
"//:patches/v8/0011-Speed-up-V8-bazel-build-by-always-using-target-cfg.patch",
281-
"//:patches/v8/0012-Implement-Promise-Context-Tagging.patch"
274+
"//:patches/v8/0005-Fix-v8-code_generator-imports.patch",
275+
"//:patches/v8/0006-Allow-Windows-builds-under-Bazel.patch",
276+
"//:patches/v8/0007-Disable-bazel-whole-archive-build.patch",
277+
"//:patches/v8/0008-Make-v8-Locker-automatically-call-isolate-Enter.patch",
278+
"//:patches/v8/0009-Add-an-API-to-capture-and-restore-the-cage-base-poin.patch",
279+
"//:patches/v8/0010-Speed-up-V8-bazel-build-by-always-using-target-cfg.patch",
280+
"//:patches/v8/0011-Implement-Promise-Context-Tagging.patch"
282281
],
283282
)
284283

patches/v8/0005-Allow-compiling-on-macOS-catalina-and-ventura.patch

Lines changed: 0 additions & 33 deletions
This file was deleted.

patches/v8/0006-Fix-v8-code_generator-imports.patch renamed to patches/v8/0005-Fix-v8-code_generator-imports.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 83cbeb6956004e3a55bb0d050eac27f907cb18ce Mon Sep 17 00:00:00 2001
1+
From a584f161ca505d380cc1d4ac8e268e024973f42a Mon Sep 17 00:00:00 2001
22
From: Felix Hanau <felix@cloudflare.com>
33
Date: Wed, 8 Mar 2023 16:15:31 -0500
44
Subject: Fix v8 code_generator imports

patches/v8/0007-Allow-Windows-builds-under-Bazel.patch renamed to patches/v8/0006-Allow-Windows-builds-under-Bazel.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From b770088ebb9f7da03b598f386f25913772254705 Mon Sep 17 00:00:00 2001
1+
From 29c35c6848cd9e3a7e6d5e570dc62131aaab5baf Mon Sep 17 00:00:00 2001
22
From: Brendan Coll <bcoll@cloudflare.com>
33
Date: Thu, 16 Mar 2023 11:56:10 +0000
44
Subject: Allow Windows builds under Bazel
@@ -183,7 +183,7 @@ index 67454fa90eea460e70e286623fb1c99edd22c650..7efff1ab909dc7048a216e511c2e71c7
183183
name = "is_clang",
184184
match_any = [
185185
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
186-
index 0be041c35bd3a1967800d2cf30d82369c11c51ed..9fe9a78fd777eabdff8db2555b0cb212630fb319 100644
186+
index 9651a31e062b2739e01bce1e8259030564dad9d8..9badf25f9ac9473c0636dfecf14a279f633f58d4 100644
187187
--- a/bazel/defs.bzl
188188
+++ b/bazel/defs.bzl
189189
@@ -117,6 +117,24 @@ def _default_args():
@@ -211,7 +211,7 @@ index 0be041c35bd3a1967800d2cf30d82369c11c51ed..9fe9a78fd777eabdff8db2555b0cb212
211211
"//conditions:default": [],
212212
}) + select({
213213
"@v8//bazel/config:is_clang": [
214-
@@ -175,13 +193,23 @@ def _default_args():
214+
@@ -163,13 +181,23 @@ def _default_args():
215215
],
216216
"//conditions:default": [
217217
],
@@ -235,15 +235,15 @@ index 0be041c35bd3a1967800d2cf30d82369c11c51ed..9fe9a78fd777eabdff8db2555b0cb212
235235
],
236236
"@v8//bazel/config:is_macos": ["-pthread"],
237237
"//conditions:default": ["-Wl,--no-as-needed -ldl -pthread"],
238-
@@ -571,6 +599,7 @@ def v8_mksnapshot(name, args, suffix = ""):
238+
@@ -559,6 +587,7 @@ def v8_mksnapshot(name, args, suffix = ""):
239239
suffix = suffix,
240240
target_os = select({
241241
"@v8//bazel/config:is_macos": "mac",
242242
+ "@v8//bazel/config:is_windows": "win",
243243
"//conditions:default": "",
244244
}),
245245
)
246-
@@ -582,6 +611,7 @@ def v8_mksnapshot(name, args, suffix = ""):
246+
@@ -570,6 +599,7 @@ def v8_mksnapshot(name, args, suffix = ""):
247247
suffix = suffix,
248248
target_os = select({
249249
"@v8//bazel/config:is_macos": "mac",

patches/v8/0008-Disable-bazel-whole-archive-build.patch renamed to patches/v8/0007-Disable-bazel-whole-archive-build.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 5071fbad481a774b2a25b9b5d166116478effd36 Mon Sep 17 00:00:00 2001
1+
From 40b749ea96fcc95a63a4d3a4bcca5dc5474d7180 Mon Sep 17 00:00:00 2001
22
From: Felix Hanau <felix@cloudflare.com>
33
Date: Tue, 11 Apr 2023 14:41:31 -0400
44
Subject: Disable bazel whole-archive build
@@ -7,7 +7,7 @@ V8's bazel configuration system adds the alwayslink parameter (equivalent
77
to --Wl,-whole-archive on Linux) to all V8 libraries, causing all V8
88
object files to be included even if they are not referenced. This is more
99
aggressive than what's done in the GN build system and not needed for
10-
workerd disabling alwayslink improves the binary size by ~ 1MB as it
10+
workerd - disabling alwayslink improves the binary size by ~ 1MB as it
1111
allows the linker to eliminate unused symbols.
1212
---
1313
bazel/BUILD.icu | 4 ++--

patches/v8/0009-Make-v8-Locker-automatically-call-isolate-Enter.patch renamed to patches/v8/0008-Make-v8-Locker-automatically-call-isolate-Enter.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 005e4b00d926575ca1798493689d278d23a7c267 Mon Sep 17 00:00:00 2001
1+
From 9fbfa1ab0ce695ec96a5a01f721b5c696ba8ceb8 Mon Sep 17 00:00:00 2001
22
From: Kenton Varda <kenton@cloudflare.com>
33
Date: Tue, 23 May 2023 09:18:57 -0500
44
Subject: Make v8::Locker automatically call isolate->Enter().

patches/v8/0010-Add-an-API-to-capture-and-restore-the-cage-base-poin.patch renamed to patches/v8/0009-Add-an-API-to-capture-and-restore-the-cage-base-poin.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From dc1a15b66a2967c1b0477d9fbe83f0d1d9309ab4 Mon Sep 17 00:00:00 2001
1+
From 7414b4dd9f0855651c9907e93ea272265d798af1 Mon Sep 17 00:00:00 2001
22
From: Kenton Varda <kenton@cloudflare.com>
33
Date: Tue, 23 May 2023 09:24:11 -0500
44
Subject: Add an API to capture and restore the cage base pointers.

patches/v8/0011-Speed-up-V8-bazel-build-by-always-using-target-cfg.patch renamed to patches/v8/0010-Speed-up-V8-bazel-build-by-always-using-target-cfg.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From cb1c4d8ae1d77857791b3fa4634538ef6d1b0d2f Mon Sep 17 00:00:00 2001
1+
From 3a11c0c287505a74d0ad028b55db2a696729a80e Mon Sep 17 00:00:00 2001
22
From: Felix Hanau <felix@cloudflare.com>
33
Date: Wed, 7 Jun 2023 21:40:54 -0400
44
Subject: Speed up V8 bazel build by always using target cfg
@@ -163,10 +163,10 @@ index 68480f5461d3afa1c826ca8cd929cdc7d44882b0..f1a0121373eae1102e057252d5048331
163163
],
164164
)
165165
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
166-
index 9fe9a78fd777eabdff8db2555b0cb212630fb319..6808b167eafeb8700d075808b9979b63fa84ab22 100644
166+
index 9badf25f9ac9473c0636dfecf14a279f633f58d4..402c4d384466c5a3be35ae69d1527c8e6d12a9b8 100644
167167
--- a/bazel/defs.bzl
168168
+++ b/bazel/defs.bzl
169-
@@ -348,7 +348,16 @@ def v8_library(
169+
@@ -336,7 +336,16 @@ def v8_library(
170170
**kwargs
171171
)
172172

@@ -184,7 +184,7 @@ index 9fe9a78fd777eabdff8db2555b0cb212630fb319..6808b167eafeb8700d075808b9979b63
184184
if ctx.workspace_name == "v8":
185185
v8root = "."
186186
else:
187-
@@ -367,7 +376,8 @@ def _torque_initializers_impl(ctx):
187+
@@ -355,7 +364,8 @@ def _torque_initializers_impl(ctx):
188188
args += [f.path for f in ctx.files.srcs]
189189

190190
# Generate/declare output files
@@ -194,7 +194,7 @@ index 9fe9a78fd777eabdff8db2555b0cb212630fb319..6808b167eafeb8700d075808b9979b63
194194
for src in ctx.files.srcs:
195195
root, _period, _ext = src.path.rpartition(".")
196196

197-
@@ -375,134 +385,68 @@ def _torque_initializers_impl(ctx):
197+
@@ -363,134 +373,68 @@ def _torque_initializers_impl(ctx):
198198
if root[:len(v8root)] == v8root:
199199
root = root[len(v8root):]
200200
file = ctx.attr.prefix + "/torque-generated/" + root
@@ -358,7 +358,7 @@ index 9fe9a78fd777eabdff8db2555b0cb212630fb319..6808b167eafeb8700d075808b9979b63
358358
tool = select({
359359
"@v8//bazel/config:v8_target_is_32_bits": ":icu/torque_non_pointer_compression",
360360
"//conditions:default": ":icu/torque",
361-
@@ -578,16 +522,19 @@ _v8_mksnapshot = rule(
361+
@@ -566,16 +510,19 @@ _v8_mksnapshot = rule(
362362
mandatory = True,
363363
allow_files = True,
364364
executable = True,
@@ -383,7 +383,7 @@ index 9fe9a78fd777eabdff8db2555b0cb212630fb319..6808b167eafeb8700d075808b9979b63
383383
)
384384

385385
def v8_mksnapshot(name, args, suffix = ""):
386-
@@ -708,3 +655,34 @@ def v8_build_config(name):
386+
@@ -696,3 +643,34 @@ def v8_build_config(name):
387387
outs = ["icu/" + name + ".json"],
388388
cmd = "echo '" + build_config_content(cpu, "true") + "' > \"$@\"",
389389
)

patches/v8/0012-Implement-Promise-Context-Tagging.patch renamed to patches/v8/0011-Implement-Promise-Context-Tagging.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 5f0ccf4ff0bda92a2a7cb5c3abff1054235cabba Mon Sep 17 00:00:00 2001
1+
From 4f32ca480fc566f8bb345fb3410e746360891c68 Mon Sep 17 00:00:00 2001
22
From: James M Snell <jasnell@gmail.com>
33
Date: Thu, 22 Jun 2023 15:29:26 -0700
44
Subject: Implement Promise Context Tagging

0 commit comments

Comments
 (0)