From e0188146bd30d28d72e344face6592c0f9800a93 Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Mon, 7 Apr 2025 12:35:45 +0200 Subject: [PATCH] Remove -latomic flag from V8 bazel build. See https://github.com/cloudflare/workerd/discussions/3762 --- build/deps/v8.bzl | 1 + ...1-Remove-unneded-latomic-linker-flag.patch | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 patches/v8/0021-Remove-unneded-latomic-linker-flag.patch diff --git a/build/deps/v8.bzl b/build/deps/v8.bzl index 091a03af517..2668ef8df64 100644 --- a/build/deps/v8.bzl +++ b/build/deps/v8.bzl @@ -26,6 +26,7 @@ PATCHES = [ "0018-Disable-memory-leak-assert-when-shutting-down-V8.patch", "0019-Enable-V8-shared-linkage.patch", "0020-Modify-where-to-look-for-fast_float-and-simdutf.patch", + "0021-Remove-unneded-latomic-linker-flag.patch", ] # V8 and its dependencies diff --git a/patches/v8/0021-Remove-unneded-latomic-linker-flag.patch b/patches/v8/0021-Remove-unneded-latomic-linker-flag.patch new file mode 100644 index 00000000000..e49435d6f3d --- /dev/null +++ b/patches/v8/0021-Remove-unneded-latomic-linker-flag.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Erik Corry +Date: Mon, 7 Apr 2025 12:32:30 +0200 +Subject: Remove unneded -latomic linker flag + + +diff --git a/bazel/defs.bzl b/bazel/defs.bzl +index 497246e6e5f63b5e73251177317a3c99cbdc7b09..5f1b78775caa39c840d92daffd51125e7b4a0705 100644 +--- a/bazel/defs.bzl ++++ b/bazel/defs.bzl +@@ -205,7 +205,7 @@ def _default_args(): + "Shell32.lib", + ], + "@v8//bazel/config:is_macos": ["-pthread"], +- "//conditions:default": ["-Wl,--no-as-needed -ldl -latomic -pthread"], ++ "//conditions:default": ["-Wl,--no-as-needed -ldl -pthread"], + }) + select({ + ":should_add_rdynamic": ["-rdynamic"], + "//conditions:default": [],