File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ index 1111111..2222222 100644
77 ARG RELEASE_FLAGS="-O3 -DNDEBUG=1"
88 ARG LLVM_VERSION="19"
99- ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 "
10- + # Added -ftls-model=global-dynamic for Node.js addon (dlopen) compatibility
11- + ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 -ftls-model=global-dynamic "
10+ + # Added -fPIC and - ftls-model=global-dynamic for Node.js addon (dlopen) compatibility
11+ + ARG DEFAULT_CFLAGS="-fPIC - mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 -ftls-model=global-dynamic "
1212 ARG ENABLE_SANITIZERS=""
1313
1414 # Use different base images for ARM64 vs x86_64
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ index 1111111..2222222 100644
77 ARG LTO_FLAG="-flto=full -fwhole-program-vtables -fforce-emit-vtables "
88 ARG LLVM_VERSION="19"
99- ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 "
10- + # Added -ftls-model=global-dynamic for Node.js addon (dlopen) compatibility
11- + ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 -ftls-model=global-dynamic "
10+ + # Added -fPIC and - ftls-model=global-dynamic for Node.js addon (dlopen) compatibility
11+ + ARG DEFAULT_CFLAGS="-fPIC - mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 -ftls-model=global-dynamic "
1212
1313 FROM alpine:3.21 as base
1414
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ index 1111111..2222222 100644
77 THIS_DIR=$(pwd)
88
99+ # Added for Node.js addon (dlopen) compatibility
10+ + LIBBUN_PIC_FLAG="-fPIC"
1011+ LIBBUN_TLS_FLAG="-ftls-model=global-dynamic"
1112+
1213 # Set default values for environment variables that are not set.
@@ -24,8 +25,8 @@ index 1111111..2222222 100644
2425 -DCMAKE_CXX_COMPILER="$CMAKE_CXX_COMPILER" \
2526- -DCMAKE_C_FLAGS="-g $CMAKE_C_FLAGS -ffile-prefix-map=$THIS_DIR/Source=vendor/WebKit/Source" \
2627- -DCMAKE_CXX_FLAGS="-g $CMAKE_CXX_FLAGS -ffile-prefix-map=$THIS_DIR/Source=vendor/WebKit/Source" \
27- + -DCMAKE_C_FLAGS="-g $CMAKE_C_FLAGS $LIBBUN_TLS_FLAG -ffile-prefix-map=$THIS_DIR/Source=vendor/WebKit/Source" \
28- + -DCMAKE_CXX_FLAGS="-g $CMAKE_CXX_FLAGS $LIBBUN_TLS_FLAG -ffile-prefix-map=$THIS_DIR/Source=vendor/WebKit/Source" \
28+ + -DCMAKE_C_FLAGS="-g $CMAKE_C_FLAGS $LIBBUN_PIC_FLAG $ LIBBUN_TLS_FLAG -ffile-prefix-map=$THIS_DIR/Source=vendor/WebKit/Source" \
29+ + -DCMAKE_CXX_FLAGS="-g $CMAKE_CXX_FLAGS $LIBBUN_PIC_FLAG $ LIBBUN_TLS_FLAG -ffile-prefix-map=$THIS_DIR/Source=vendor/WebKit/Source" \
2930 -DENABLE_MALLOC_HEAP_BREAKDOWN=$ENABLE_MALLOC_HEAP_BREAKDOWN \
3031 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
3132
You can’t perform that action at this time.
0 commit comments