Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 04a4ca6dfae9fba7f49b3d8ce548f7afd1303d67
- Author: Simon Hausmann <simon.hausmann@nokia.com>
- Date: Mon Nov 21 16:03:43 2011 +0100
- [Qt] Speed up debug builds.
- Reviewed by NOBODY (OOPS!).
- Source/JavaScriptCore:
- * Target.pri: Make BUILDING_JavaScriptCore available earlier, so it can be
- used by the build system.
- Source/WebCore:
- * Target.pri: Make BUILDING_WebCore available earlier, so it can be
- used by the build system.
- Source/WebKit2:
- * Target.pri: Make BUILDING_WebKit2 available, so it can be
- used by the build system.
- Tools:
- Introduce a special type of build that replaces the static jsc/wc/wk2
- static libraries with shared libraries, that individually are much faster
- to link and don't require relinking into the big library when changing just
- one file in one module. It can be enabled with
- --qmakearg="CONFIG+=force_static_libs_as_shared"
- * qmake/mkspecs/features/force_static_libs_as_shared.prf: Added. With this configuration,
- disable symbol visibility, static linkage and enable rpath.
- * qmake/mkspecs/features/functions.prf: Add a helper function to determine if
- we need to link the convenience libraries together or not and renamed linkStaticLibrary
- to just linkLibrary (because linkage is not necessarily static).
- * qmake/mkspecs/features/qtwebkit.prf: When using the trick, make sure to also
- link against jsc/wc/wk2 when linking app code against QtWebKit.
- * qmake/mkspecs/features/javascriptcore.prf: Use new +needToLinkLibrary helper
- function.
- * qmake/mkspecs/features/webcore.prf: Ditto.
- * qmake/mkspecs/features/webkit2.prf: Ditto.
- diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
- index f6ddea7..e5ff254 100644
- --- a/Source/JavaScriptCore/ChangeLog
- +++ b/Source/JavaScriptCore/ChangeLog
- @@ -1,3 +1,12 @@
- +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
- +
- + [Qt] Speed up debug builds.
- +
- + Reviewed by NOBODY (OOPS!).
- +
- + * Target.pri: Make BUILDING_JavaScriptCore available earlier, so it can be
- + used by the build system.
- +
- 2011-11-20 Filip Pizlo <fpizlo@apple.com>
- Unreviewed interpreter build fix.
- diff --git a/Source/JavaScriptCore/Target.pri b/Source/JavaScriptCore/Target.pri
- index 5534946..38d382d 100644
- --- a/Source/JavaScriptCore/Target.pri
- +++ b/Source/JavaScriptCore/Target.pri
- @@ -6,10 +6,10 @@
- TEMPLATE = lib
- -load(javascriptcore)
- -
- DEFINES += BUILDING_JavaScriptCore BUILDING_WTF
- +load(javascriptcore)
- +
- CONFIG += javas
- CONFIG += staticlib
- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
- index d54a17c..4fb74d4 100644
- --- a/Source/WebCore/ChangeLog
- +++ b/Source/WebCore/ChangeLog
- @@ -1,3 +1,12 @@
- +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
- +
- + [Qt] Speed up debug builds.
- +
- + Reviewed by NOBODY (OOPS!).
- +
- + * Target.pri: Make BUILDING_WebCore available earlier, so it can be
- + used by the build system.
- +
- 2011-11-20 Kenichi Ishibashi <bashi@chromium.org>
- [Chromium] Remove old getFontFamilyForCharacters() and familyForChars() APIs.
- diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
- index 407161b..fcac657 100644
- --- a/Source/WebCore/Target.pri
- +++ b/Source/WebCore/Target.pri
- @@ -6,11 +6,11 @@
- TEMPLATE = lib
- +DEFINES += BUILDING_WebCore BUILDING_WTF
- +
- load(webcore)
- load(javascriptcore)
- -DEFINES += BUILDING_WebCore BUILDING_WTF
- -
- CONFIG += staticlib
- TARGET = $$WEBCORE_TARGET
- diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
- index c6153c6..32cdd3d 100644
- --- a/Source/WebKit2/ChangeLog
- +++ b/Source/WebKit2/ChangeLog
- @@ -1,3 +1,12 @@
- +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
- +
- + [Qt] Speed up debug builds.
- +
- + Reviewed by NOBODY (OOPS!).
- +
- + * Target.pri: Make BUILDING_WebKit2 available, so it can be
- + used by the build system.
- +
- 2011-10-17 Antonio Gomes <agomes@rim.com>
- Pass a Frame* parameter in EditorClient::respondToChangedSelection
- diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri
- index 7b26da8..00b8d0b 100644
- --- a/Source/WebKit2/Target.pri
- +++ b/Source/WebKit2/Target.pri
- @@ -6,6 +6,8 @@
- TEMPLATE = lib
- +DEFINES += BUILDING_WebKit2
- +
- load(javascriptcore)
- load(webcore)
- load(webkit2)
- diff --git a/Tools/ChangeLog b/Tools/ChangeLog
- index a7f97d7..43d0a07 100644
- --- a/Tools/ChangeLog
- +++ b/Tools/ChangeLog
- @@ -1,3 +1,27 @@
- +2011-11-18 Simon Hausmann <simon.hausmann@nokia.com>
- +
- + [Qt] Speed up debug builds.
- +
- + Reviewed by NOBODY (OOPS!).
- +
- + Introduce a special type of build that replaces the static jsc/wc/wk2
- + static libraries with shared libraries, that individually are much faster
- + to link and don't require relinking into the big library when changing just
- + one file in one module. It can be enabled with
- + --qmakearg="CONFIG+=force_static_libs_as_shared"
- +
- + * qmake/mkspecs/features/force_static_libs_as_shared.prf: Added. With this configuration,
- + disable symbol visibility, static linkage and enable rpath.
- + * qmake/mkspecs/features/functions.prf: Add a helper function to determine if
- + we need to link the convenience libraries together or not and renamed linkStaticLibrary
- + to just linkLibrary (because linkage is not necessarily static).
- + * qmake/mkspecs/features/qtwebkit.prf: When using the trick, make sure to also
- + link against jsc/wc/wk2 when linking app code against QtWebKit.
- + * qmake/mkspecs/features/javascriptcore.prf: Use new +needToLinkLibrary helper
- + function.
- + * qmake/mkspecs/features/webcore.prf: Ditto.
- + * qmake/mkspecs/features/webkit2.prf: Ditto.
- +
- 2011-11-20 Shinya Kawanaka <shinyak@google.com>
- [Chromium] Layout test does not return correct misspelling positions if there are multiple misspelled words.
- diff --git a/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf b/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf
- new file mode 100644
- index 0000000..70df9aa
- --- /dev/null
- +++ b/Tools/qmake/mkspecs/features/force_static_libs_as_shared.prf
- @@ -0,0 +1,16 @@
- +# -------------------------------------------------------------------
- +# Feature to allow speeding up link times for debug builds by avoiding
- +# re-linking the static libraries into the one big shared library.
- +#
- +# See 'Tools/qmake/README' for an overview of the build system
- +# -------------------------------------------------------------------
- +
- +contains(TEMPLATE, lib) {
- + contains(CONFIG, staticlib) {
- + CONFIG -= hide_symbols
- + CONFIG -= staticlib
- + CONFIG += rpath
- + DESTDIR = $${ROOT_BUILD_DIR}/lib
- + }
- +}
- +
- diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
- index c3cb36f..609b8df 100644
- --- a/Tools/qmake/mkspecs/features/functions.prf
- +++ b/Tools/qmake/mkspecs/features/functions.prf
- @@ -225,34 +225,54 @@ defineTest(prependEach) {
- return(true)
- }
- -defineTest(linkStaticLibrary) {
- +defineTest(needToLinkLibrary) {
- + unset(name)
- +
- + name = $$1
- +
- + config_step {
- + return(true)
- + } else:force_static_libs_as_shared {
- + contains(DEFINES, BUILDING_$$name): return(false)
- + return(true)
- + }
- + return(false)
- +}
- +
- +defineTest(linkLibrary) {
- unset(path)
- unset(target)
- path = $$1
- target = $$2
- - mac {
- - LIBS = -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a $$LIBS
- - } else:win32-msvc*|wince*|win32-icc {
- - LIBS = /OPT:REF -l$$target $$LIBS
- + force_static_libs_as_shared {
- + LIBS = -L$${ROOT_BUILD_DIR}/lib -l$$target $$LIBS
- } else {
- - LIBS = -Wl,-whole-archive -l$$target -Wl,-no-whole-archive $$LIBS
- - }
- - win32-msvc*|wince*|win32-icc {
- - LIBS = -L$$path $$LIBS
- - POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
- - } else {
- - QMAKE_LIBDIR = $$path $$QMAKE_LIBDIR
- - POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}lib$${target}.a
- - }
- + mac {
- + LIBS = -Wl,-force_load,$${path}$${QMAKE_DIR_SEP}lib$${target}.a $$LIBS
- + } else:win32-msvc*|wince*|win32-icc {
- + LIBS = /OPT:REF -l$$target $$LIBS
- + } else {
- + LIBS = -Wl,-whole-archive -l$$target -Wl,-no-whole-archive $$LIBS
- + }
- - # The following line is to prevent qmake from adding jscore to libQtWebKit's prl dependencies.
- - # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit
- - # statically in applications (which isn't used often because, among other things, of licensing obstacles).
- - CONFIG -= explicitlib
- - CONFIG -= staticlib
- + win32-msvc*|wince*|win32-icc {
- + LIBS = -L$$path $$LIBS
- + POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}$${target}.lib
- + } else {
- + QMAKE_LIBDIR = $$path $$QMAKE_LIBDIR
- + POST_TARGETDEPS += $${path}$${QMAKE_DIR_SEP}lib$${target}.a
- + }
- +
- + # The following line is to prevent qmake from adding jscore to libQtWebKit's prl dependencies.
- + # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit
- + # statically in applications (which isn't used often because, among other things, of licensing obstacles).
- + CONFIG -= explicitlib
- + CONFIG -= staticlib
- +
- + }
- export(LIBS)
- export(QMAKE_LIBDIR)
- diff --git a/Tools/qmake/mkspecs/features/javascriptcore.prf b/Tools/qmake/mkspecs/features/javascriptcore.prf
- index 8dcd0c7..960148d 100644
- --- a/Tools/qmake/mkspecs/features/javascriptcore.prf
- +++ b/Tools/qmake/mkspecs/features/javascriptcore.prf
- @@ -74,9 +74,9 @@ linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
- }
- }
- -config_step {
- +needToLinkLibrary(JavaScriptCore) {
- pathToJavaScriptCoreOutput = $$buildDirForSource(Source/JavaScriptCore)/$$JAVASCRIPTCORE_DESTDIR
- - linkStaticLibrary($$pathToJavaScriptCoreOutput, $$JAVASCRIPTCORE_TARGET)
- + linkLibrary($$pathToJavaScriptCoreOutput, $$JAVASCRIPTCORE_TARGET)
- win32-* {
- LIBS += -lwinmm
- diff --git a/Tools/qmake/mkspecs/features/qtwebkit.prf b/Tools/qmake/mkspecs/features/qtwebkit.prf
- index 90cbd6e..10b8e94 100644
- --- a/Tools/qmake/mkspecs/features/qtwebkit.prf
- +++ b/Tools/qmake/mkspecs/features/qtwebkit.prf
- @@ -25,5 +25,9 @@ config_step {
- DEPENDPATH += $$ROOT_WEBKIT_DIR/Source/WebKit/qt/Api
- INCLUDEPATH += $${ROOT_BUILD_DIR}/include/QtWebKit
- +
- + force_static_libs_as_shared {
- + LIBS += -lwebkit2 -lwebcore -ljscore
- + }
- }
- diff --git a/Tools/qmake/mkspecs/features/webcore.prf b/Tools/qmake/mkspecs/features/webcore.prf
- index 87adcc9..eaddd00 100644
- --- a/Tools/qmake/mkspecs/features/webcore.prf
- +++ b/Tools/qmake/mkspecs/features/webcore.prf
- @@ -285,7 +285,7 @@ unix|win32-g++* {
- enable_fast_mobile_scrolling: DEFINES += ENABLE_FAST_MOBILE_SCROLLING=1
- -config_step {
- +needToLinkLibrary(WebCore) {
- pathToWebCoreOutput = $$buildDirForSource(Source/WebCore)/$$WEBCORE_DESTDIR
- - linkStaticLibrary($$pathToWebCoreOutput, $$WEBCORE_TARGET)
- + linkLibrary($$pathToWebCoreOutput, $$WEBCORE_TARGET)
- }
- diff --git a/Tools/qmake/mkspecs/features/webkit2.prf b/Tools/qmake/mkspecs/features/webkit2.prf
- index 50a2409..e476104 100644
- --- a/Tools/qmake/mkspecs/features/webkit2.prf
- +++ b/Tools/qmake/mkspecs/features/webkit2.prf
- @@ -64,7 +64,7 @@ WEBKIT2_INCLUDEPATH = \
- INCLUDEPATH = $$WEBKIT2_INCLUDEPATH $$WEBKIT2_GENERATED_SOURCES_DIR $$INCLUDEPATH
- -config_step {
- +needToLinkLibrary(WebKit2) {
- pathToWebKit2Output = $$buildDirForSource(Source/WebKit2)/$$WEBKIT2_DESTDIR
- - linkStaticLibrary($$pathToWebKit2Output, $$WEBKIT2_TARGET)
- + linkLibrary($$pathToWebKit2Output, $$WEBKIT2_TARGET)
- }
Add Comment
Please, Sign In to add comment