Skip to content

Commit

Permalink
V8: fix relocation error
Browse files Browse the repository at this point in the history
```
ld.lld: error: relocation R_X86_64_TPOFF32 against v8::internal::g_current_local_heap_ cannot be used with -shared
ld.lld: error: relocation R_386_TLS_LE against v8::internal::g_current_isolate_ cannot be used with -shared
ld.lld: error: relocation R_ARM_TLS_LE32 against v8::internal::g_current_isolate_ cannot be used with -shared
ld.lld: error: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against v8::internal::g_current_local_heap_ cannot be used with -shared
relocation R_X86_64_TPOFF32 against hidden symbol `_ZN2v88internal18g_current_isolate_E' can not be used when making a shared object
```
  • Loading branch information
bblanchon committed Nov 19, 2024
1 parent b769d92 commit d9555a4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patches/linux/v8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/BUILD.gn b/BUILD.gn
index 6a4efbb03ee..9c0a45df4a5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1096,6 +1096,7 @@ config("features") {

defines =
[ "V8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=${v8_typed_array_max_size_in_heap}" ]
+ defines += ["V8_TLS_USED_IN_LIBRARY"]

configs = [
":v8_header_features",
4 changes: 4 additions & 0 deletions steps/03-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ case "$OS" in
[ "${PDFium_ENABLE_V8:-}" == "true" ] && git -C v8 apply -v "$PATCHES/ios/v8.patch"
;;

linux)
[ "${PDFium_ENABLE_V8:-}" == "true" ] && git -C v8 apply -v "$PATCHES/linux/v8.patch"
;;

wasm)
git apply -v "$PATCHES/wasm/pdfium.patch"
git -C build apply -v "$PATCHES/wasm/build.patch"
Expand Down

0 comments on commit d9555a4

Please sign in to comment.