Skip to content

Commit

Permalink
Set PIE
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jul 20, 2024
1 parent 8e4ea67 commit c3a0089
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ ENV MARCH_FLAG=${MARCH_FLAG}


RUN --mount=type=tmpfs,target=/webkitbuild \
export CFLAGS="${DEFAULT_CFLAGS} $CFLAGS $LTO_FLAG -fno-pic -fno-pie " && \
export CXXFLAGS="${DEFAULT_CFLAGS} $CXXFLAGS $LTO_FLAG -fno-pic -fno-pie -fno-c++-static-destructors " && \
export LDFLAGS="-fuse-ld=lld $LDFLAGS -Wl,-z,norelro -Wl,-z,lazy -Wl,-no-pie " && \
export CFLAGS="${DEFAULT_CFLAGS} $CFLAGS $LTO_FLAG -fno-pic " && \
export CXXFLAGS="${DEFAULT_CFLAGS} $CXXFLAGS $LTO_FLAG -fno-pic -fno-c++-static-destructors " && \
export LDFLAGS="-fuse-ld=lld $LDFLAGS " && \
cd /webkitbuild && \
cmake \
-DPORT="JSCOnly" \
Expand All @@ -122,7 +122,7 @@ RUN --mount=type=tmpfs,target=/webkitbuild \
-DALLOW_LINE_AND_COLUMN_NUMBER_IN_BUILTINS=ON \
-DENABLE_SINGLE_THREADED_VM_ENTRY_SCOPE=ON \
-DENABLE_REMOTE_INSPECTOR=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" \
-DCMAKE_AR=$(which llvm-ar) \
-DCMAKE_RANLIB=$(which llvm-ranlib) \
Expand Down
4 changes: 3 additions & 1 deletion Source/cmake/WebKitCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
set(WebKit_LIBRARY_TYPE SHARED)
set(WebCoreTestSupport_LIBRARY_TYPE STATIC)

set(CMAKE_POSITION_INDEPENDENT_CODE True)
if (NOT USE_BUN_JSC_ADDITIONS)
set(CMAKE_POSITION_INDEPENDENT_CODE True)
endif ()

# -----------------------------------------------------------------------------
# Install JavaScript shell
Expand Down

0 comments on commit c3a0089

Please sign in to comment.