Skip to content

Commit 328911b

Browse files
committed
fix: enable PIC (required for .node shared library embedding)
1 parent 4915684 commit 328911b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

patches/006-enable-pic.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/Source/cmake/OptionsJSCOnly.cmake b/Source/cmake/OptionsJSCOnly.cmake
2+
index 1111111..2222222 100644
3+
--- a/Source/cmake/OptionsJSCOnly.cmake
4+
+++ b/Source/cmake/OptionsJSCOnly.cmake
5+
@@ -128,9 +128,10 @@ if (ENABLE_STATIC_JSC)
6+
set(WebCore_LIBRARY_TYPE SHARED)
7+
endif ()
8+
9+
-if (USE_BUN_JSC_ADDITIONS)
10+
- set(CMAKE_POSITION_INDEPENDENT_CODE False)
11+
-endif ()
12+
+# libbun-webkit: Force PIC for Node.js addon (.node) embedding via dlopen()
13+
+# Original oven-sh/WebKit disables PIC since Bun is an executable, but we need
14+
+# PIC because libbun is linked into a shared library.
15+
+set(CMAKE_POSITION_INDEPENDENT_CODE True)
16+
17+
if (WIN32)
18+
add_definitions(-D_WINDOWS -DNTDDI_VERSION=0x0A000006 -D_WIN32_WINNT=0x0A00)

0 commit comments

Comments
 (0)