From d4914857d13c38b505cbf8c41b781138a5b281bf Mon Sep 17 00:00:00 2001 From: Damian Wrobel Date: Wed, 26 Jan 2022 13:38:53 +0100 Subject: [PATCH] ONEM-10964 Allow to compile webkit using gcc 7.x series Mitigates the following build error: 1_2.22.1+git-r0/git/Source/JavaScriptCore/API/glib/JSCVirtualMachine.cpp:48:13: error: G_ADD_PRIVATE [-Werror] 48 | WEBKIT_DEFINE_TYPE(JSCVirtualMachine, jsc_virtual_machine, G_TYPE_OBJECT) | ^~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors --- Source/cmake/OptionsWPE.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake index f9bf9d15dfbb5..30848cd60f3aa 100644 --- a/Source/cmake/OptionsWPE.cmake +++ b/Source/cmake/OptionsWPE.cmake @@ -229,8 +229,8 @@ if (COMPILER_IS_GCC_OR_CLANG AND UNIX AND NOT APPLE) if (CMAKE_COMPILER_IS_GNUCC AND (WTF_CPU_ARM64 OR WTF_CPU_ARM OR WTF_CPU_MIPS)) set(CMAKE_COMPILER_SIZE_OPT_FLAGS " -finline-limit=90 -fsection-anchors") endif () - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${CMAKE_COMPILER_SIZE_OPT_FLAGS} -ffunction-sections -fdata-sections -Werror -Wformat=1 -Wno-pragmas") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${CMAKE_COMPILER_SIZE_OPT_FLAGS} -ffunction-sections -fdata-sections -fno-rtti -Werror -Wformat=1 -Wno-pragmas") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}${CMAKE_COMPILER_SIZE_OPT_FLAGS} -ffunction-sections -fdata-sections -Wformat=1 -Wno-pragmas") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${CMAKE_COMPILER_SIZE_OPT_FLAGS} -ffunction-sections -fdata-sections -fno-rtti -Wformat=1 -Wno-pragmas") set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,--gc-sections") if (NOT ENABLE_ADDRESS_SANITIZER) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fno-stack-protector")