[EFL] Introduce DEVELOPER_MODE
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Aug 2014 09:12:59 +0000 (09:12 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Aug 2014 09:12:59 +0000 (09:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135884

Reviewed by Gyuyoung Kim.

.:

Like GTK port, DEVELOPER_MODE can be good solution for developing, debugging and testing
instead of SHARED_CORE.
SHARED_CORE can reduce link time and memory consumption but it is slightly different
from release binary.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/WebKitHelpers.cmake:
Moved fvisibility=hidden to OptionsEfl.cmake

Tools:

* Scripts/webkitdirs.pm: Turn on DEVELOPER_MODE for the EFL port.
(generateBuildSystemFromCMakeProject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172894 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/cmake/OptionsEfl.cmake
Source/cmake/WebKitHelpers.cmake
Tools/ChangeLog
Tools/Scripts/webkitdirs.pm

index 15411b9..66fd0fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-08-24  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Introduce DEVELOPER_MODE
+        https://bugs.webkit.org/show_bug.cgi?id=135884
+
+        Reviewed by Gyuyoung Kim.
+
+        Like GTK port, DEVELOPER_MODE can be good solution for developing, debugging and testing
+        instead of SHARED_CORE.
+        SHARED_CORE can reduce link time and memory consumption but it is slightly different
+        from release binary.
+
+        * Source/cmake/OptionsEfl.cmake:
+        * Source/cmake/WebKitHelpers.cmake:
+        Moved fvisibility=hidden to OptionsEfl.cmake
+
 2014-08-22  KwangHyuk Kim  <hyuki.kim@samsung.com>
 
         [EFL] Turn on ENABLE_GAMEPAD_DEPRECATED option.
index 76bfd94..b17bb28 100644 (file)
@@ -47,12 +47,20 @@ file(MAKE_DIRECTORY ${THEME_BINARY_DIR})
 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}"
                 -DTEST_THEME_DIR="${THEME_BINARY_DIR}")
 
-set(WEBKIT2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
-
 WEBKIT_OPTION_BEGIN()
+
+if (DEVELOPER_MODE)
+    set(ENABLE_TOOLS ON)
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS ON)
+else ()
+    set(ENABLE_TOOLS OFF)
+    WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS OFF)
+
+    set(WEBKIT2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/eflsymbols.filter")
+endif ()
+
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_3D_RENDERING ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCESSIBILITY ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_API_TESTS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_BATTERY_STATUS ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS3_CONDITIONAL_RULES ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS3_TEXT ON)
@@ -282,6 +290,12 @@ if (CMAKE_COMPILER_IS_GNUCC AND UNIX AND NOT APPLE)
     set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
 endif ()
 
+# FIXME: Consider to use linker script
+if (NOT SHARED_CORE AND NOT DEVELOPER_MODE)
+    set(CMAKE_C_FLAGS_RELEASE "-fvisibility=hidden ${CMAKE_C_FLAGS_RELEASE}")
+    set(CMAKE_CXX_FLAGS_RELEASE "-fvisibility=hidden ${CMAKE_CXX_FLAGS_RELEASE}")
+endif ()
+
 if (ENABLE_SPELLCHECK)
     find_package(Enchant REQUIRED)
 endif ()
index 9564d23..2a22352 100644 (file)
@@ -18,12 +18,6 @@ macro(WEBKIT_SET_EXTRA_COMPILER_FLAGS _target)
             EXEC_PROGRAM("${CMAKE_CXX_COMPILER} -E -Wp,-dM - < /dev/null | grep '#define __VERSION__' | grep -E -o '[0-9]+\\.[0-9]+\\.?[0-9]+?'" OUTPUT_VARIABLE COMPILER_VERSION)
         endif ()
 
-        # For GTK+ we will rely on a linker script to deal with symbol visibility on
-        # production builds, we want all symbols visible for development builds.
-        if (NOT SHARED_CORE AND NOT ${PORT} STREQUAL "GTK")
-            set(OLD_COMPILE_FLAGS "-fvisibility=hidden ${OLD_COMPILE_FLAGS}")
-        endif ()
-
         get_target_property(TARGET_TYPE ${_target} TYPE)
         if (${TARGET_TYPE} STREQUAL "STATIC_LIBRARY") # -fPIC is automatically added to shared libraries
             set(OLD_COMPILE_FLAGS "-fPIC ${OLD_COMPILE_FLAGS}")
index 77ecfbe..d5e68a6 100644 (file)
@@ -1,3 +1,13 @@
+2014-08-24  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL] Introduce DEVELOPER_MODE
+        https://bugs.webkit.org/show_bug.cgi?id=135884
+
+        Reviewed by Gyuyoung Kim.
+
+        * Scripts/webkitdirs.pm: Turn on DEVELOPER_MODE for the EFL port.
+        (generateBuildSystemFromCMakeProject):
+
 2014-08-24  Alexey Proskuryakov  <ap@apple.com>
 
         build.webkit.org/dashboard unnecessarily loads results of hidden queues
index 51217c2..4d22d49 100755 (executable)
@@ -1942,7 +1942,7 @@ sub generateBuildSystemFromCMakeProject
     }
 
     # GTK+ has a production mode, but build-webkit should always use developer mode.
-    push @args, "-DDEVELOPER_MODE=ON" if isGtk();
+    push @args, "-DDEVELOPER_MODE=ON" if isEfl() || isGtk();
 
     # Don't warn variables which aren't used by cmake ports.
     push @args, "--no-warn-unused-cli";