- Revision
- 142088
- Author
- abe...@webkit.org
- Date
- 2013-02-07 03:02:10 -0800 (Thu, 07 Feb 2013)
Log Message
[Qt] Use GNU ar's thin archive format for intermediate static libs
https://bugs.webkit.org/show_bug.cgi?id=109052
Reviewed by Jocelyn Turcotte.
Source/_javascript_Core:
Adjust project files that used activeBuildConfig()
to use targetSubDir().
* _javascript_Core.pri:
* LLIntOffsetsExtractor.pro:
* Target.pri:
Tools:
With debug builds we exceed the 4GiB limit of GNU ar when creating the WebCore
intermediate static library which results in build failure even with a x86_64
toolchain (http://sourceware.org/bugzilla/show_bug.cgi?id=14625).
When using a GNU toolchain we can use the thin archive format for these static
libraries which also has the benefit of not copying the object files, thus
drastically reducing disk usage and overall compile time.
Currently qmake does not support GNU ar's thin archive format so for
now we need to do the magic in the build system as a stopgap solution.
* qmake/mkspecs/features/configure.prf:
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/functions.prf:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (142087 => 142088)
--- trunk/Source/_javascript_Core/ChangeLog 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-02-07 11:02:10 UTC (rev 142088)
@@ -1,3 +1,17 @@
+2013-02-07 Andras Becsi <andras.be...@digia.com>
+
+ [Qt] Use GNU ar's thin archive format for intermediate static libs
+ https://bugs.webkit.org/show_bug.cgi?id=109052
+
+ Reviewed by Jocelyn Turcotte.
+
+ Adjust project files that used activeBuildConfig()
+ to use targetSubDir().
+
+ * _javascript_Core.pri:
+ * LLIntOffsetsExtractor.pro:
+ * Target.pri:
+
2013-02-06 Roger Fong <roger_f...@apple.com>
Unreviewed. Touchups to VS2010 WebKit solution.
Modified: trunk/Source/_javascript_Core/_javascript_Core.pri (142087 => 142088)
--- trunk/Source/_javascript_Core/_javascript_Core.pri 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Source/_javascript_Core/_javascript_Core.pri 2013-02-07 11:02:10 UTC (rev 142088)
@@ -33,7 +33,7 @@
$$_javascript_CORE_GENERATED_SOURCES_DIR
# Pick up the right version of LLIntAssembly.h
-macx: INCLUDEPATH += $$_javascript_CORE_GENERATED_SOURCES_DIR/$$activeBuildConfig()
+macx: INCLUDEPATH += $$_javascript_CORE_GENERATED_SOURCES_DIR/$$targetSubDir()
win32-*: LIBS += -lwinmm
Modified: trunk/Source/_javascript_Core/LLIntOffsetsExtractor.pro (142087 => 142088)
--- trunk/Source/_javascript_Core/LLIntOffsetsExtractor.pro 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Source/_javascript_Core/LLIntOffsetsExtractor.pro 2013-02-07 11:02:10 UTC (rev 142088)
@@ -8,7 +8,7 @@
TEMPLATE = app
TARGET = LLIntOffsetsExtractor
-macx: DESTDIR = $$activeBuildConfig()
+macx: DESTDIR = $$targetSubDir()
debug_and_release {
CONFIG += force_build_all
Modified: trunk/Source/_javascript_Core/Target.pri (142087 => 142088)
--- trunk/Source/_javascript_Core/Target.pri 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Source/_javascript_Core/Target.pri 2013-02-07 11:02:10 UTC (rev 142088)
@@ -30,7 +30,7 @@
INSTALLDEPS += all
-debug_and_release: INCLUDEPATH += $$_javascript_CORE_GENERATED_SOURCES_DIR/$$activeBuildConfig()
+debug_and_release: INCLUDEPATH += $$_javascript_CORE_GENERATED_SOURCES_DIR/$$targetSubDir()
SOURCES += \
API/JSBase.cpp \
Modified: trunk/Tools/ChangeLog (142087 => 142088)
--- trunk/Tools/ChangeLog 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Tools/ChangeLog 2013-02-07 11:02:10 UTC (rev 142088)
@@ -1,3 +1,25 @@
+2013-02-07 Andras Becsi <andras.be...@digia.com>
+
+ [Qt] Use GNU ar's thin archive format for intermediate static libs
+ https://bugs.webkit.org/show_bug.cgi?id=109052
+
+ Reviewed by Jocelyn Turcotte.
+
+ With debug builds we exceed the 4GiB limit of GNU ar when creating the WebCore
+ intermediate static library which results in build failure even with a x86_64
+ toolchain (http://sourceware.org/bugzilla/show_bug.cgi?id=14625).
+
+ When using a GNU toolchain we can use the thin archive format for these static
+ libraries which also has the benefit of not copying the object files, thus
+ drastically reducing disk usage and overall compile time.
+
+ Currently qmake does not support GNU ar's thin archive format so for
+ now we need to do the magic in the build system as a stopgap solution.
+
+ * qmake/mkspecs/features/configure.prf:
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/functions.prf:
+
2013-02-05 Simon Hausmann <simon.hausm...@digia.com>
[Qt] Compile WTF tests of TestWebKitAPI
Modified: trunk/Tools/qmake/mkspecs/features/configure.prf (142087 => 142088)
--- trunk/Tools/qmake/mkspecs/features/configure.prf 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Tools/qmake/mkspecs/features/configure.prf 2013-02-07 11:02:10 UTC (rev 142088)
@@ -207,6 +207,7 @@
log(All-in-one files .............. $$configEnabled(use_all_in_one_files)$$EOL)
log(GNUmake ....................... $$configEnabled(GNUmake)$$EOL)
log(Static libs as shared ......... $$configEnabled(force_static_libs_as_shared)$$EOL)
+ log(Static libs as thin archives .. $$configEnabled(gnu_thin_archives)$$EOL)
log(Production build .............. $$configEnabled(production_build)$$EOL)
log($$EOL)
Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (142087 => 142088)
--- trunk/Tools/qmake/mkspecs/features/default_post.prf 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf 2013-02-07 11:02:10 UTC (rev 142088)
@@ -14,6 +14,7 @@
# Avoid it with debug_and_release, it can cause the application to load both the debug and release
# dependent libraries when using frameworks on Mac.
!production_build:!debug_and_release:!buildbot:!win*:!build?(webkit2): CONFIG += force_static_libs_as_shared
+!debug_and_release:*-g++*: CONFIG += gnu_thin_archives
# Don't create .prl files for intermediate libraries because their contents get used when linking against
# them, breaking "-Wl,-whole-archive -lMyIntermediateLib --Wl,-no-whole-archive"
@@ -269,8 +270,15 @@
# system already takes care of this for the top level QtWebKit library.
!qt_install_module:debug_and_release: TARGET = $$qtLibraryTarget($$TARGET)
- isEmpty(DESTDIR): DESTDIR = $$activeBuildConfig()
+ gnu_thin_archives {
+ # Replace the hardcoded archiver command line
+ # options to use GNU ar's thin archive format.
+ AR_COMMAND = $$split(QMAKE_AR, " ")
+ QMAKE_AR = $$member(AR_COMMAND, 0) cruT
+ }
+ isEmpty(DESTDIR): DESTDIR = $$targetSubDir()
+
DEFINES += QT_ASCII_CAST_WARNINGS
!plugin {
Modified: trunk/Tools/qmake/mkspecs/features/functions.prf (142087 => 142088)
--- trunk/Tools/qmake/mkspecs/features/functions.prf 2013-02-07 11:01:31 UTC (rev 142087)
+++ trunk/Tools/qmake/mkspecs/features/functions.prf 2013-02-07 11:02:10 UTC (rev 142088)
@@ -24,8 +24,12 @@
return($$replace(1, \\\\, \\\\\\\\))
}
-defineReplace(activeBuildConfig) {
- CONFIG(debug, debug|release): return(debug)
+defineReplace(targetSubDir) {
+ # The paths to the elements of the thin archive are stored
+ # relative to the archive itself, thus we have to prevent
+ # qmake from moving the archive after creation.
+ gnu_thin_archives: return()
+ else: CONFIG(debug, debug|release): return(debug)
else: return(release)
}
@@ -245,7 +249,7 @@
target = $$resolveFinalLibraryName($$target)
- path = $$replace(source_dir, $$re_escape($${ROOT_WEBKIT_DIR}), $${ROOT_BUILD_DIR})/$$activeBuildConfig()
+ path = $$replace(source_dir, $$re_escape($${ROOT_WEBKIT_DIR}), $${ROOT_BUILD_DIR})/$$targetSubDir()
force_static_libs_as_shared {
LIBS += -L$${ROOT_BUILD_DIR}/lib -l$$target