Changeset 142088 in webkit


Ignore:
Timestamp:
Feb 7, 2013 3:02:10 AM (11 years ago)
Author:
abecsi@webkit.org
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/JavaScriptCore:

Adjust project files that used activeBuildConfig()
to use targetSubDir().

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:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r142060 r142088  
     12013-02-07  Andras Becsi  <andras.becsi@digia.com>
     2
     3        [Qt] Use GNU ar's thin archive format for intermediate static libs
     4        https://bugs.webkit.org/show_bug.cgi?id=109052
     5
     6        Reviewed by Jocelyn Turcotte.
     7
     8        Adjust project files that used activeBuildConfig()
     9        to use targetSubDir().
     10
     11        * JavaScriptCore.pri:
     12        * LLIntOffsetsExtractor.pro:
     13        * Target.pri:
     14
    1152013-02-06  Roger Fong  <roger_fong@apple.com>
    216
  • trunk/Source/JavaScriptCore/JavaScriptCore.pri

    r137311 r142088  
    3434
    3535# Pick up the right version of LLIntAssembly.h
    36 macx: INCLUDEPATH += $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR/$$activeBuildConfig()
     36macx: INCLUDEPATH += $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR/$$targetSubDir()
    3737
    3838win32-*: LIBS += -lwinmm
  • trunk/Source/JavaScriptCore/LLIntOffsetsExtractor.pro

    r136232 r142088  
    99TARGET = LLIntOffsetsExtractor
    1010
    11 macx: DESTDIR = $$activeBuildConfig()
     11macx: DESTDIR = $$targetSubDir()
    1212
    1313debug_and_release {
  • trunk/Source/JavaScriptCore/Target.pri

    r141931 r142088  
    3131INSTALLDEPS += all
    3232
    33 debug_and_release: INCLUDEPATH += $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR/$$activeBuildConfig()
     33debug_and_release: INCLUDEPATH += $$JAVASCRIPTCORE_GENERATED_SOURCES_DIR/$$targetSubDir()
    3434
    3535SOURCES += \
  • trunk/Tools/ChangeLog

    r142070 r142088  
     12013-02-07  Andras Becsi  <andras.becsi@digia.com>
     2
     3        [Qt] Use GNU ar's thin archive format for intermediate static libs
     4        https://bugs.webkit.org/show_bug.cgi?id=109052
     5
     6        Reviewed by Jocelyn Turcotte.
     7
     8        With debug builds we exceed the 4GiB limit of GNU ar when creating the WebCore
     9        intermediate static library which results in build failure even with a x86_64
     10        toolchain (http://sourceware.org/bugzilla/show_bug.cgi?id=14625).
     11
     12        When using a GNU toolchain we can use the thin archive format for these static
     13        libraries which also has the benefit of not copying the object files, thus
     14        drastically reducing disk usage and overall compile time.
     15
     16        Currently qmake does not support GNU ar's thin archive format so for
     17        now we need to do the magic in the build system as a stopgap solution.
     18
     19        * qmake/mkspecs/features/configure.prf:
     20        * qmake/mkspecs/features/default_post.prf:
     21        * qmake/mkspecs/features/functions.prf:
     22
    1232013-02-05  Simon Hausmann  <simon.hausmann@digia.com>
    224
  • trunk/Tools/qmake/mkspecs/features/configure.prf

    r134200 r142088  
    208208        log(GNUmake ....................... $$configEnabled(GNUmake)$$EOL)
    209209        log(Static libs as shared ......... $$configEnabled(force_static_libs_as_shared)$$EOL)
     210        log(Static libs as thin archives .. $$configEnabled(gnu_thin_archives)$$EOL)
    210211        log(Production build .............. $$configEnabled(production_build)$$EOL)
    211212        log($$EOL)
  • trunk/Tools/qmake/mkspecs/features/default_post.prf

    r142070 r142088  
    1515# dependent libraries when using frameworks on Mac.
    1616!production_build:!debug_and_release:!buildbot:!win*:!build?(webkit2): CONFIG += force_static_libs_as_shared
     17!debug_and_release:*-g++*: CONFIG += gnu_thin_archives
    1718
    1819# Don't create .prl files for intermediate libraries because their contents get used when linking against
     
    270271    !qt_install_module:debug_and_release: TARGET = $$qtLibraryTarget($$TARGET)
    271272
    272     isEmpty(DESTDIR): DESTDIR = $$activeBuildConfig()
     273    gnu_thin_archives {
     274        # Replace the hardcoded archiver command line
     275        # options to use GNU ar's thin archive format.
     276        AR_COMMAND = $$split(QMAKE_AR, " ")
     277        QMAKE_AR = $$member(AR_COMMAND, 0) cruT
     278    }
     279
     280    isEmpty(DESTDIR): DESTDIR = $$targetSubDir()
    273281
    274282    DEFINES += QT_ASCII_CAST_WARNINGS
  • trunk/Tools/qmake/mkspecs/features/functions.prf

    r137886 r142088  
    2525}
    2626
    27 defineReplace(activeBuildConfig) {
    28     CONFIG(debug, debug|release): return(debug)
     27defineReplace(targetSubDir) {
     28    # The paths to the elements of the thin archive are stored
     29    # relative to the archive itself, thus we have to prevent
     30    # qmake from moving the archive after creation.
     31    gnu_thin_archives: return()
     32    else: CONFIG(debug, debug|release): return(debug)
    2933    else: return(release)
    3034}
     
    246250    target = $$resolveFinalLibraryName($$target)
    247251
    248     path = $$replace(source_dir, $$re_escape($${ROOT_WEBKIT_DIR}), $${ROOT_BUILD_DIR})/$$activeBuildConfig()
     252    path = $$replace(source_dir, $$re_escape($${ROOT_WEBKIT_DIR}), $${ROOT_BUILD_DIR})/$$targetSubDir()
    249253
    250254    force_static_libs_as_shared {
Note: See TracChangeset for help on using the changeset viewer.