diff --git a/Dockerfile b/Dockerfile index d13198797cf71..80c1db106639c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,7 +114,8 @@ 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_EXE_LINKER_FLAGS="-fuse-ld=lld" \ + -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -Wl,-z,norelro -Wl,-z,lazy -Wl,-no-pie " \ + -DCMAKE_POSITION_INDEPENDENT_CODE=OFF \ -DCMAKE_AR=$(which llvm-ar) \ -DCMAKE_RANLIB=$(which llvm-ranlib) \ -DCMAKE_C_FLAGS="$CFLAGS" \ diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt index db15b8d9a9cf3..b4ea2fb127ea4 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt @@ -1577,7 +1577,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND GCC_OFFLINEASM_SOURCE_MAP) set_source_files_properties("llint/LowLevelInterpreter.cpp" PROPERTIES COMPILE_DEFINITIONS "POSTPROCESS_ASM=llint/LowLevelInterpreter.cpp" - COMPILE_OPTIONS "-fno-lto") + COMPILE_FLAGS "-fno-lto") endif() # When building JavaScriptCore as an object library, we need to make sure the diff --git a/Source/cmake/OptionsJSCOnly.cmake b/Source/cmake/OptionsJSCOnly.cmake index 66dcf4d01426a..7737682b19f98 100644 --- a/Source/cmake/OptionsJSCOnly.cmake +++ b/Source/cmake/OptionsJSCOnly.cmake @@ -120,6 +120,9 @@ if (NOT ENABLE_STATIC_JSC) set(WebCore_LIBRARY_TYPE SHARED) endif () +if (USE_BUN_JSC_ADDITIONS) + set(CMAKE_POSITION_INDEPENDENT_CODE False) +endif () if (WIN32) add_definitions(-DNOMINMAX)