Skip to content

Commit 590f014

Browse files
committed
arm: Fix build issue related to latomic
This is to avoid the below issue for arm build ``` 5267.3 ld.lld-18: error: undefined symbol: __atomic_compare_exchange 5267.3 >>> referenced by wasm-import-wrapper-cache.cc 5267.3 >>> bazel-out/aarch64-opt-exec-ST-5dc91bda6aaf/bin/external/v8/_objs/v8_libshared_noicu/wasm-import-wrapper-cache.o:(v8::internal::wasm::WasmImportWrapperHandle::~WasmImportWrapperHandle()) 5267.3 >>> referenced by wasm-code-pointer-table.cc 5267.3 >>> bazel-out/aarch64-opt-exec-ST-5dc91bda6aaf/bin/external/v8/_objs/v8_libshared_noicu/wasm-code-pointer-table.o:(v8::internal::wasm::WasmCodePointerTable::FreeNativeFunctionHandles()) 5267.3 >>> referenced by wasm-code-pointer-table.cc 5267.3 >>> bazel-out/aarch64-opt-exec-ST-5dc91bda6aaf/bin/external/v8/_objs/v8_libshared_noicu/wasm-code-pointer-table.o:(v8::internal::wasm::WasmCodePointerTable::SweepSegments(unsigned long)) 5267.3 >>> referenced 5 more times ```
1 parent 0b5291f commit 590f014

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

WORKSPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ git_repository(
4343
"@//patches:0004-thread_local-reset-slot-in-worker-threads-first.patch",
4444
"@//patches:0005-http-header-expose-attribute.patch",
4545
"@//patches:0006-build-Fix-arm-build-for-liburing.patch",
46+
"@//patches:0007-Add-latomic-back-for-arm-build.patch",
4647
],
4748
# // clang-format off: Envoy's format check: Only repository_locations.bzl may contains URL references
4849
remote = "https://github.com/envoyproxy/envoy.git",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 4dad6252057e395d8c87831419e6e05d55d323a6 Mon Sep 17 00:00:00 2001
2+
From: Tam Mach <sayboras@yahoo.com>
3+
Date: Fri, 12 Dec 2025 13:45:27 +1100
4+
Subject: [PATCH] Add latomic back for arm build
5+
6+
---
7+
bazel/v8.patch | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/bazel/v8.patch b/bazel/v8.patch
11+
index 9b0cb2374f..512b22ebf4 100644
12+
--- a/bazel/v8.patch
13+
+++ b/bazel/v8.patch
14+
@@ -284,7 +284,7 @@ index 39663c97df4..14b90ec6905 100644
15+
],
16+
"@v8//bazel/config:is_macos": ["-pthread"],
17+
- "//conditions:default": ["-Wl,--no-as-needed -ldl -latomic -pthread"],
18+
-+ "//conditions:default": ["-Wl,--no-as-needed -ldl -pthread"],
19+
++ "//conditions:default": ["-Wl,--no-as-needed -ldl -latomic -pthread"],
20+
}) + select({
21+
":should_add_rdynamic": ["-rdynamic"],
22+
"//conditions:default": [],
23+
--
24+
2.43.0
25+

0 commit comments

Comments
 (0)