[CMake] Use thin archives if building on Linux for non-shared-core debug builds
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2014 01:28:19 +0000 (01:28 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Mar 2014 01:28:19 +0000 (01:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=108330

Reviewed by Martin Robinson.

In order to get non-shared debug builds, this patch applied T option for
thin archives to the flags passed to ar when cmake based ports build on linux.
In addition, applied u option which avoids adding a file twice.

* Source/cmake/OptionsCommon.cmake: Moved archive options from OptionsGTK.cmake.
* Source/cmake/OptionsEfl.cmake:
Removed error messages for non-shared-core debug builds.
* Source/cmake/OptionsGTK.cmake: Moved archive options to OptionsCommon.cmake.

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

ChangeLog
Source/cmake/OptionsCommon.cmake
Source/cmake/OptionsEfl.cmake
Source/cmake/OptionsGTK.cmake

index 5dfb8e4..a304537 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2014-03-05  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [CMake] Use thin archives if building on Linux for non-shared-core debug builds
+        https://bugs.webkit.org/show_bug.cgi?id=108330
+
+        Reviewed by Martin Robinson.
+
+        In order to get non-shared debug builds, this patch applied T option for
+        thin archives to the flags passed to ar when cmake based ports build on linux.
+        In addition, applied u option which avoids adding a file twice.
+
+        * Source/cmake/OptionsCommon.cmake: Moved archive options from OptionsGTK.cmake.
+        * Source/cmake/OptionsEfl.cmake:
+        Removed error messages for non-shared-core debug builds.
+        * Source/cmake/OptionsGTK.cmake: Moved archive options to OptionsCommon.cmake.
+
 2014-03-04  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Build the Udis86 disassembler
index 4a4c26f..e41b9bc 100644 (file)
@@ -19,6 +19,13 @@ else ()
     set(CODE_GENERATOR_PREPROCESSOR_WITH_LINEMARKERS "${CMAKE_CXX_COMPILER} -E -x c++")
 endif ()
 
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif ()
+
 set_property(GLOBAL PROPERTY USE_FOLDERS ON)
 
 if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
index 654cac5..2abfc3c 100644 (file)
@@ -9,11 +9,6 @@ if (NOT DEFINED ENABLE_WEBKIT2)
     set(ENABLE_WEBKIT2 ON)
 endif ()
 
-string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_CMAKE_BUILD_TYPE)
-if (LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "debug" AND NOT SHARED_CORE)
-    message(FATAL_ERROR "Turn on the SHARED_CORE flag to make a debug build - e.g.\n build-webkit --efl --debug --cmakeargs=\"-DSHARED_CORE=ON\".\n")
-endif ()
-
 find_package(Cairo 1.10.2 REQUIRED)
 find_package(Fontconfig 2.8.0 REQUIRED)
 find_package(Sqlite REQUIRED)
index 69440df..c7aa153 100644 (file)
@@ -159,13 +159,6 @@ endif ()
 add_definitions(-DWTF_PLATFORM_X11=1)
 add_definitions(-DMOZ_X11)
 
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-endif ()
-
 find_package(Cairo 1.10.2 REQUIRED)
 find_package(Fontconfig 2.8.0 REQUIRED)
 find_package(Freetype 2.4.2 REQUIRED)