Skip to content

Commit 8b224d4

Browse files
[CMake] Properly test if compiler supports compiler flags
https://bugs.webkit.org/show_bug.cgi?id=174490 Reviewed by Konstantin Tokarev. .: This turned out to be a massive pain. I didn't want to merely check options before using them: I also wanted to organize the code to avoid setting similar flags in different places. Right now we set a bunch of global flags in OptionsCommon.cmake, and a bunch more flags in WEBKIT_SET_EXTRA_COMPILER_FLAGS on a per-target basis. Setting flags per-target seems better in general, e.g. because it makes it very easy to disable warnings for particular ThirdParty targets. But it turns out that all the flags set on a per-target basis get passed to both the C compiler and the C++ compiler, so it's impossible to pass C++-only flags there. That's terrible. It's possible to make the flags language-conditional using generator expressions, but that doesn't work for the Visual Studio backend, so we would have to drop support for that (not going to happen). The CMake documentation suggests that C and C++ files ought to be built in separate targets to avoid this. It's a mess, basically. So I've wound up removing WEBKIT_SET_EXTRA_COMPILER_FLAGS and adding most of those flags to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS instead. Really the only disadvantage of this is we now have to suppress individual warnings when building ANGLESupport in WebCore. That's not the end of the world. The only remaining useful feature of WEBKIT_SET_EXTRA_COMPILER_FLAGS was to add -fPIC to static library targets, but turns out CMake does that for us if we just set the variable CMAKE_POSITION_INDEPENDENT_CODE, so we can get rid of it completely. Of course there are also macros for setting target-specific compiler flags, which we frequently need in order to suppress specific warnings, particularly warnings coming from third-party libraries like ANGLE and gtest. But remember the footgun: these macros will test the flag against only one compiler, but must work with both C and C++ compilers unless the build target exclusively contains targets built with just one of those compilers. Yuck. * CMakeLists.txt: * Source/CMakeLists.txt: * Source/PlatformGTK.cmake: * Source/cmake/OptionsCommon.cmake: * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitCompilerFlags.cmake: Added. * Source/cmake/WebKitMacros.cmake: Source/JavaScriptCore: * API/tests/PingPongStackOverflowTest.cpp: (testPingPongStackOverflow): * API/tests/testapi.c: * b3/testb3.cpp: (JSC::B3::testPatchpointLotsOfLateAnys): Source/ThirdParty: * brotli/CMakeLists.txt: * gtest/CMakeLists.txt: * woff2/CMakeLists.txt: * xdgmime/CMakeLists.txt: Source/WebCore: * CMakeLists.txt: * PlatformGTK.cmake: * PlatformWPE.cmake: Source/WebDriver: * WebDriverService.cpp: (WebDriver::WebDriverService::run): * glib/SessionHostGlib.cpp: Source/WebKit: * CMakeLists.txt: * PlatformGTK.cmake: Source/WTF: * wtf/Compiler.h: Tools: * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * MiniBrowser/gtk/CMakeLists.txt: * TestRunnerShared/Bindings/JSWrapper.cpp: (WTR::JSWrapper::initialize): * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformGTK.cmake: * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp: (TestWebKitAPI::CheckedArithmeticTester::run): * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp: * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp: * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp: (formControlsAssociatedCallback): * TestWebKitAPI/glib/CMakeLists.txt: * TestWebKitAPI/glib/WebKitGLib/TestMain.h: (Test::getResourcesDir): * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: (WTR::menuItemClickCallback): (WTR::staticConvertMenuItemToType): * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setUseDashboardCompatibilityMode): * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp: (WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks): * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: (WTR::AccessibilityUIElement::helpText const): (WTR::AccessibilityUIElement::attributedStringForRange): * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp: (WTR::EventSenderProxy::updateTouchPoint): (WTR::EventSenderProxy::releaseTouchPoint): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent b422ebb commit 8b224d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+489
-238
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ set(WebKit_LIBRARY_TYPE SHARED)
126126
set(WebKit2_LIBRARY_TYPE SHARED)
127127
set(WebCoreTestSupport_LIBRARY_TYPE STATIC)
128128

129+
set(CMAKE_POSITION_INDEPENDENT_CODE True)
130+
129131
# -----------------------------------------------------------------------------
130132
# Install JavaScript shell
131133
# -----------------------------------------------------------------------------

ChangeLog

+42
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
2017-08-08 Michael Catanzaro <[email protected]>
2+
3+
[CMake] Properly test if compiler supports compiler flags
4+
https://bugs.webkit.org/show_bug.cgi?id=174490
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
This turned out to be a massive pain. I didn't want to merely check options before using
9+
them: I also wanted to organize the code to avoid setting similar flags in different places.
10+
Right now we set a bunch of global flags in OptionsCommon.cmake, and a bunch more flags in
11+
WEBKIT_SET_EXTRA_COMPILER_FLAGS on a per-target basis.
12+
13+
Setting flags per-target seems better in general, e.g. because it makes it very easy to
14+
disable warnings for particular ThirdParty targets. But it turns out that all the flags set
15+
on a per-target basis get passed to both the C compiler and the C++ compiler, so it's
16+
impossible to pass C++-only flags there. That's terrible. It's possible to make the flags
17+
language-conditional using generator expressions, but that doesn't work for the Visual
18+
Studio backend, so we would have to drop support for that (not going to happen). The CMake
19+
documentation suggests that C and C++ files ought to be built in separate targets to avoid
20+
this. It's a mess, basically.
21+
22+
So I've wound up removing WEBKIT_SET_EXTRA_COMPILER_FLAGS and adding most of those flags to
23+
CMAKE_C_FLAGS and CMAKE_CXX_FLAGS instead. Really the only disadvantage of this is we now
24+
have to suppress individual warnings when building ANGLESupport in WebCore. That's not the
25+
end of the world. The only remaining useful feature of WEBKIT_SET_EXTRA_COMPILER_FLAGS was
26+
to add -fPIC to static library targets, but turns out CMake does that for us if we just set
27+
the variable CMAKE_POSITION_INDEPENDENT_CODE, so we can get rid of it completely.
28+
29+
Of course there are also macros for setting target-specific compiler flags, which we
30+
frequently need in order to suppress specific warnings, particularly warnings coming from
31+
third-party libraries like ANGLE and gtest. But remember the footgun: these macros will test
32+
the flag against only one compiler, but must work with both C and C++ compilers unless the
33+
build target exclusively contains targets built with just one of those compilers. Yuck.
34+
35+
* CMakeLists.txt:
36+
* Source/CMakeLists.txt:
37+
* Source/PlatformGTK.cmake:
38+
* Source/cmake/OptionsCommon.cmake:
39+
* Source/cmake/WebKitCommon.cmake:
40+
* Source/cmake/WebKitCompilerFlags.cmake: Added.
41+
* Source/cmake/WebKitMacros.cmake:
42+
143
2017-08-07 Brian Burg <[email protected]>
244

345
Remove CANVAS_PATH compilation guard

Source/CMakeLists.txt

-26
Original file line numberDiff line numberDiff line change
@@ -43,29 +43,3 @@ if (ENABLE_WEBDRIVER)
4343
endif ()
4444

4545
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
46-
47-
# -----------------------------------------------------------------------------
48-
# Set compiler flags for all targets
49-
# -----------------------------------------------------------------------------
50-
if (NOT USE_SYSTEM_MALLOC)
51-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(bmalloc ${ADDITIONAL_COMPILER_FLAGS})
52-
endif ()
53-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WTF ${ADDITIONAL_COMPILER_FLAGS})
54-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(JavaScriptCore ${ADDITIONAL_COMPILER_FLAGS})
55-
56-
if (ENABLE_WEBCORE)
57-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(PAL ${ADDITIONAL_COMPILER_FLAGS})
58-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_COMPILER_FLAGS})
59-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCore ${ADDITIONAL_COMPILER_FLAGS})
60-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreDerivedSources ${ADDITIONAL_COMPILER_FLAGS})
61-
endif ()
62-
63-
if (ENABLE_WEBKIT_LEGACY)
64-
# FIXME: Rename this target to WebKitLegacy.
65-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit ${ADDITIONAL_COMPILER_FLAGS})
66-
endif ()
67-
68-
if (ENABLE_WEBKIT)
69-
# FIXME: Rename this target to WebKit.
70-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit2 ${ADDITIONAL_COMPILER_FLAGS})
71-
endif ()

Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ int testPingPongStackOverflow()
142142
"PingPongStackOverflowObject.__proto__ = undefined;" \
143143
"undefined instanceof PingPongStackOverflowObject;";
144144

145-
JSValueRef scriptResult = nullptr;
146145
JSValueRef exception = nullptr;
147146
JSStringRef script = JSStringCreateWithUTF8CString(scriptString);
148147

@@ -161,7 +160,7 @@ int testPingPongStackOverflow()
161160
Options::maxPerThreadStackUsage() = stackSize + Options::softReservedZoneSize();
162161

163162
exception = nullptr;
164-
scriptResult = JSEvaluateScript(context, script, nullptr, nullptr, 1, &exception);
163+
JSEvaluateScript(context, script, nullptr, nullptr, 1, &exception);
165164

166165
if (!exception) {
167166
printf("FAIL: PingPongStackOverflowError not thrown in PingPongStackOverflow test\n");

Source/JavaScriptCore/API/tests/testapi.c

+7
Original file line numberDiff line numberDiff line change
@@ -1134,13 +1134,20 @@ static bool globalContextNameTest()
11341134
return result;
11351135
}
11361136

1137+
#if COMPILER(GCC)
1138+
#pragma GCC diagnostic push
1139+
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
1140+
#endif
11371141
static void checkConstnessInJSObjectNames()
11381142
{
11391143
JSStaticFunction fun;
11401144
fun.name = "something";
11411145
JSStaticValue val;
11421146
val.name = "something";
11431147
}
1148+
#if COMPILER(GCC)
1149+
#pragma GCC diagnostic pop
1150+
#endif
11441151

11451152
#ifdef __cplusplus
11461153
extern "C" {

Source/JavaScriptCore/ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2017-08-08 Michael Catanzaro <[email protected]>
2+
3+
[CMake] Properly test if compiler supports compiler flags
4+
https://bugs.webkit.org/show_bug.cgi?id=174490
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
* API/tests/PingPongStackOverflowTest.cpp:
9+
(testPingPongStackOverflow):
10+
* API/tests/testapi.c:
11+
* b3/testb3.cpp:
12+
(JSC::B3::testPatchpointLotsOfLateAnys):
13+
114
2017-08-06 Yusuke Suzuki <[email protected]>
215

316
[Linux] Clear WasmMemory with madvice instead of memset

Source/JavaScriptCore/b3/testb3.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8481,7 +8481,7 @@ void testPatchpointLotsOfLateAnys()
84818481
});
84828482
root->appendNewControlValue(proc, Return, Origin(), patchpoint);
84838483

8484-
CHECK(compileAndRun<int>(proc) == (things.size() * (things.size() - 1)) / 2);
8484+
CHECK(static_cast<size_t>(compileAndRun<int>(proc)) == (things.size() * (things.size() - 1)) / 2);
84858485
}
84868486

84878487
void testPatchpointAnyImm(ValueRep rep)

Source/PlatformGTK.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ macro(ADD_GTKDOC_GENERATOR _stamp_name _extra_args)
2424
add_custom_command(
2525
OUTPUT "${CMAKE_BINARY_DIR}/${_stamp_name}"
2626
DEPENDS ${DocumentationDependencies}
27-
COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
27+
COMMAND ${CMAKE_COMMAND} -E env "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_C_FLAGS} -Wno-unused-parameter" ${CMAKE_SOURCE_DIR}/Tools/gtk/generate-gtkdoc ${_extra_args}
2828
COMMAND touch ${_stamp_name}
2929
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
30+
VERBATIM
3031
)
3132
endmacro()
3233

Source/ThirdParty/ChangeLog

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2017-08-08 Michael Catanzaro <[email protected]>
2+
3+
[CMake] Properly test if compiler supports compiler flags
4+
https://bugs.webkit.org/show_bug.cgi?id=174490
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
* brotli/CMakeLists.txt:
9+
* gtest/CMakeLists.txt:
10+
* woff2/CMakeLists.txt:
11+
* xdgmime/CMakeLists.txt:
12+
113
2017-07-17 Michael Catanzaro <[email protected]>
214

315
[CMake] Macros in WebKitMacros.cmake should be prefixed with WEBKIT_ namespace

Source/ThirdParty/brotli/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ set(BROTLI_SOURCES
1515
include_directories("${BROTLI_INCLUDE_DIRECTORIES}")
1616
add_definitions(-DBROTLI_BUILD_PORTABLE)
1717
add_library(brotli STATIC ${BROTLI_SOURCES})
18-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(brotli)
1918

2019
if (COMPILER_IS_GCC_OR_CLANG)
21-
WEBKIT_ADD_TARGET_PROPERTIES(brotli COMPILE_FLAGS "-Wno-cast-align -Wno-implicit-fallthrough")
20+
WEBKIT_ADD_TARGET_C_FLAGS(brotli -Wno-cast-align
21+
-Wno-implicit-fallthrough)
2222
endif ()

Source/ThirdParty/gtest/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ endif ()
3535
include_directories(${GTEST_INCLUDE_DIRECTORIES})
3636
add_definitions(-DGTEST_HAS_RTTI=0)
3737

38+
WEBKIT_ADD_TARGET_CXX_FLAGS(gtest -Wno-undef
39+
-Wno-suggest-attribute=format)
40+
3841
# FIXME: This works around compatibility problems in the old version of the third-pary
3942
# googletest source code checkout. It should be removed once we upgrade to a newer version.
4043
if (COMPILER_IS_CLANG)

Source/ThirdParty/woff2/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ include_directories("${THIRDPARTY_DIR}/brotli/dec")
1616
include_directories("${WOFF2_INCLUDE_DIRECTORIES}")
1717
add_library(woff2 STATIC ${WOFF2_SOURCES})
1818
target_link_libraries(woff2 brotli)
19-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(woff2)
2019

2120
if (COMPILER_IS_GCC_OR_CLANG)
22-
WEBKIT_ADD_TARGET_PROPERTIES(woff2 COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-variable -Wno-unused-parameter")
23-
endif ()
24-
25-
if (CMAKE_COMPILER_IS_GNUCXX)
26-
WEBKIT_ADD_TARGET_PROPERTIES(woff2 COMPILE_FLAGS "-Wno-unused-but-set-variable")
21+
WEBKIT_ADD_TARGET_CXX_FLAGS(woff2 -Wno-cast-align
22+
-Wno-implicit-fallthrough
23+
-Wno-sign-compare
24+
-Wno-unused-variable
25+
-Wno-unused-parameter
26+
-Wno-unused-but-set-variable)
2727
endif ()

Source/ThirdParty/xdgmime/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ set(XDGMIME_SOURCES
1919
include_directories("${XDGMIME_INCLUDE_DIRECTORIES}")
2020
add_definitions(-DXDG_PREFIX=_wk_xdg)
2121
add_library(xdgmime STATIC ${XDGMIME_SOURCES})
22-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(xdgmime)
2322

2423
if (COMPILER_IS_GCC_OR_CLANG)
25-
WEBKIT_ADD_TARGET_PROPERTIES(xdgmime COMPILE_FLAGS "-Wno-sign-compare -Wno-unused-parameter")
24+
WEBKIT_ADD_TARGET_C_FLAGS(xdgmime -Wno-sign-compare
25+
-Wno-unused-parameter)
2626
endif ()

Source/WTF/ChangeLog

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2017-08-08 Michael Catanzaro <[email protected]>
2+
3+
[CMake] Properly test if compiler supports compiler flags
4+
https://bugs.webkit.org/show_bug.cgi?id=174490
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
* wtf/Compiler.h:
9+
110
2017-08-07 Filip Pizlo <[email protected]>
211

312
Baseline JIT should do caging

Source/WTF/wtf/Compiler.h

-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@
102102
#define WTF_COMPILER_SUPPORTS_C_STATIC_ASSERT 1
103103
#endif
104104

105-
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
106-
107105
#endif /* COMPILER(GCC) */
108106

109107
/* COMPILER(MINGW) - MinGW GCC */

Source/WebCore/CMakeLists.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -4020,7 +4020,7 @@ endif ()
40204020
# See https://bugs.webkit.org/show_bug.cgi?id=146440
40214021
string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR)
40224022
if (CMAKE_COMPILER_IS_GNUCXX AND "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "(i[3-6]86|x86)$")
4023-
WEBKIT_ADD_TARGET_PROPERTIES(WebCore COMPILE_FLAGS "-fno-tree-sra")
4023+
WEBKIT_ADD_TARGET_CXX_FLAGS(WebCore -fno-tree-sra)
40244024
endif ()
40254025

40264026
if (MSVC)
@@ -4042,11 +4042,6 @@ endif ()
40424042
if (ENABLE_GRAPHICS_CONTEXT_3D AND NOT WIN32)
40434043
add_library(ANGLESupport STATIC ${ANGLESupport_SOURCES})
40444044

4045-
# Suppress null conversion warnings for sources in Source/ThirdParty/ANGLE
4046-
if (COMPILER_IS_CLANG)
4047-
WEBKIT_ADD_TARGET_PROPERTIES(ANGLESupport COMPILE_FLAGS "-Wno-null-conversion")
4048-
endif ()
4049-
40504045
# Enable the ESSL and GLSL translators.
40514046
set_property(TARGET ANGLESupport
40524047
PROPERTY COMPILE_DEFINITIONS
@@ -4062,7 +4057,14 @@ if (ENABLE_GRAPHICS_CONTEXT_3D AND NOT WIN32)
40624057
"${THIRDPARTY_DIR}/ANGLE/src/common/third_party/numerics"
40634058
)
40644059
list(APPEND WebCore_LIBRARIES ANGLESupport)
4065-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(ANGLESupport IGNORECXX_WARNINGS)
4060+
4061+
if (COMPILER_IS_GCC_OR_CLANG)
4062+
WEBKIT_ADD_TARGET_CXX_FLAGS(ANGLESupport -Wno-implicit-fallthrough
4063+
-Wno-null-conversion
4064+
-Wno-suggest-attribute=format
4065+
-Wno-unused-function
4066+
-Wno-unused-parameter)
4067+
endif ()
40664068
endif ()
40674069

40684070
target_link_libraries(WebCore ${WebCore_LIBRARIES})

Source/WebCore/ChangeLog

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2017-08-08 Michael Catanzaro <[email protected]>
2+
3+
[CMake] Properly test if compiler supports compiler flags
4+
https://bugs.webkit.org/show_bug.cgi?id=174490
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
* CMakeLists.txt:
9+
* PlatformGTK.cmake:
10+
* PlatformWPE.cmake:
11+
112
2017-08-08 Zan Dobersek <[email protected]>
213

314
[GStreamer] Don't use GraphicsContext3D in VideoTextureCoperGStreamer

Source/WebCore/PlatformGTK.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ if (ENABLE_PLUGIN_PROCESS_GTK2)
272272
# for the plugin process.
273273
add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
274274
add_dependencies(WebCorePlatformGTK2 WebCore)
275-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
276275
set_property(TARGET WebCorePlatformGTK2
277276
APPEND
278277
PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
@@ -303,7 +302,6 @@ endif ()
303302

304303
add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
305304
add_dependencies(WebCorePlatformGTK WebCore)
306-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
307305
target_include_directories(WebCorePlatformGTK PRIVATE
308306
${WebCore_INCLUDE_DIRECTORIES}
309307
)

Source/WebCore/PlatformWPE.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
193193

194194
add_library(WebCorePlatformWPE ${WebCore_LIBRARY_TYPE} ${WebCorePlatformWPE_SOURCES})
195195
add_dependencies(WebCorePlatformWPE WebCore)
196-
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformWPE)
197196
target_include_directories(WebCorePlatformWPE PRIVATE
198197
${WebCore_INCLUDE_DIRECTORIES}
199198
)

Source/WebDriver/ChangeLog

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2017-08-08 Michael Catanzaro <[email protected]>
2+
3+
[CMake] Properly test if compiler supports compiler flags
4+
https://bugs.webkit.org/show_bug.cgi?id=174490
5+
6+
Reviewed by Konstantin Tokarev.
7+
8+
* WebDriverService.cpp:
9+
(WebDriver::WebDriverService::run):
10+
* glib/SessionHostGlib.cpp:
11+
112
2017-08-07 Carlos Garcia Campos <[email protected]>
213

314
Web Automation: setUserInputForCurrentJavaScriptPrompt should fail if current dialog is not a prompt

Source/WebDriver/WebDriverService.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void printUsageStatement(const char* programName)
5353
int WebDriverService::run(int argc, char** argv)
5454
{
5555
String portString;
56-
for (unsigned i = 1 ; i < argc; ++i) {
56+
for (int i = 1 ; i < argc; ++i) {
5757
const char* arg = argv[i];
5858
if (!strcmp(arg, "-h") || !strcmp(arg, "--help")) {
5959
printUsageStatement(argv[0]);

Source/WebDriver/glib/SessionHostGlib.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static const char introspectionXML[] =
6262

6363
const GDBusInterfaceVTable SessionHost::s_interfaceVTable = {
6464
// method_call
65-
[](GDBusConnection* connection, const gchar* sender, const gchar* objectPath, const gchar* interfaceName, const gchar* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData) {
65+
[](GDBusConnection*, const gchar*, const gchar*, const gchar*, const gchar* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer userData) {
6666
auto* sessionHost = static_cast<SessionHost*>(userData);
6767
if (!g_strcmp0(methodName, "SetTargetList")) {
6868
guint64 connectionID;
@@ -94,6 +94,8 @@ const GDBusInterfaceVTable SessionHost::s_interfaceVTable = {
9494
nullptr,
9595
// set_property
9696
nullptr,
97+
// padding
98+
nullptr
9799
};
98100

99101
void SessionHost::connectToBrowser(Function<void (Succeeded)>&& completionHandler)

0 commit comments

Comments
 (0)