don't bootstrap tools when not necessary

bootstrapping is only necessary if we are cross-compiling or have a
circular build dependency.

Change-Id: I17244457652ca9d4fc797043e57070c2ae3ee5d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-03-08 22:23:30 +01:00 committed by The Qt Project
parent 53571e02a1
commit d3d8ac3546
9 changed files with 28 additions and 12 deletions

View File

@ -39,6 +39,9 @@ mac {
}
}
cross_compile: \
CONFIG += force_bootstrap
CONFIG += \
create_prl link_prl \
prepare_docs qt_docs_targets \

View File

@ -17,9 +17,9 @@ DESTDIR = $$MODULE_BASE_OUTDIR/bin
CONFIG += console
isEmpty(QMAKE_INFO_PLIST): CONFIG -= app_bundle
host_build {
host_build: QT -= gui # no host tool will ever use gui
host_build:force_bootstrap {
!build_pass: CONFIG += release
QT -= gui # no host tool will ever use gui
contains(QT, core(-private)?|xml) {
QT -= core core-private xml
QT += bootstrap-private
@ -36,7 +36,8 @@ load(qt_common)
# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to work with the non-installed build.
!build_pass:prefix_build {
# Non-bootstrapped tools always need this because of the environment setup.
!build_pass:if(!host_build|!force_bootstrap|prefix_build) {
isEmpty(MODULE):MODULE = $$TARGET
@ -46,7 +47,7 @@ load(qt_common)
load(resolve_target)
cmd = $$shell_path($$QMAKE_RESOLVED_TARGET)
!host_build: qtAddTargetEnv(cmd)
!host_build|!force_bootstrap: qtAddTargetEnv(cmd)
TOOL_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_tool_$${MODULE}.pri

View File

@ -344,8 +344,8 @@ public:
// in qdbusmisc.cpp
extern int qDBusParametersForMethod(const QMetaMethod &mm, QVector<int> &metaTypes);
#endif // QT_BOOTSTRAPPED
extern int qDBusParametersForMethod(const QList<QByteArray> &parameters, QVector<int>& metaTypes);
extern bool qDBusCheckAsyncTag(const char *tag);
extern Q_DBUS_EXPORT int qDBusParametersForMethod(const QList<QByteArray> &parameters, QVector<int>& metaTypes);
extern Q_DBUS_EXPORT bool qDBusCheckAsyncTag(const char *tag);
#ifndef QT_BOOTSTRAPPED
extern bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name);
extern QString qDBusInterfaceFromMetaObject(const QMetaObject *mo);

View File

@ -13,7 +13,8 @@ src_tools_rcc.depends = src_tools_bootstrap
src_tools_uic.subdir = tools/uic
src_tools_uic.target = sub-uic
src_tools_uic.depends = src_tools_bootstrap
force_bootstrap: src_tools_uic.depends = src_tools_bootstrap
else: src_tools_uic.depends = src_corelib
src_tools_qdoc.subdir = tools/qdoc
src_tools_qdoc.target = sub-qdoc
@ -25,11 +26,13 @@ src_tools_bootstrap_dbus.depends = src_tools_bootstrap
src_tools_qdbusxml2cpp.subdir = tools/qdbusxml2cpp
src_tools_qdbusxml2cpp.target = sub-qdbusxml2cpp
src_tools_qdbusxml2cpp.depends = src_tools_bootstrap_dbus
force_bootstrap: src_tools_qdbusxml2cpp.depends = src_tools_bootstrap_dbus
else: src_tools_qdbusxml2cpp.depends = src_dbus
src_tools_qdbuscpp2xml.subdir = tools/qdbuscpp2xml
src_tools_qdbuscpp2xml.target = sub-qdbuscpp2xml
src_tools_qdbuscpp2xml.depends = src_tools_bootstrap_dbus
force_bootstrap: src_tools_qdbuscpp2xml.depends = src_tools_bootstrap_dbus
else: src_tools_qdbuscpp2xml.depends = src_dbus
src_winmain.subdir = $$PWD/winmain
src_winmain.target = sub-winmain
@ -101,7 +104,9 @@ SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_corelib
win32:SUBDIRS += src_winmain
SUBDIRS += src_network src_sql src_xml src_testlib
contains(QT_CONFIG, dbus) {
SUBDIRS += src_dbus src_tools_bootstrap_dbus src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml
SUBDIRS += src_dbus
force_bootstrap: SUBDIRS += src_tools_bootstrap_dbus
SUBDIRS += src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml
contains(QT_CONFIG, accessibility-atspi-bridge): \
src_platformsupport.depends += src_dbus src_tools_qdbusxml2cpp
src_plugins.depends += src_dbus src_tools_qdbusxml2cpp src_tools_qdbuscpp2xml

View File

@ -1,4 +1,5 @@
option(host_build)
CONFIG += force_bootstrap
DEFINES += QT_MOC QT_NO_CAST_FROM_ASCII QT_NO_CAST_FROM_BYTEARRAY QT_NO_COMPRESS

View File

@ -1,5 +1,7 @@
option(host_build)
QT += bootstrap_dbus-private
QT = core-private
force_bootstrap: QT += bootstrap_dbus-private
else: QT += dbus-private
DEFINES += QT_NO_CAST_FROM_ASCII
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS

View File

@ -1,5 +1,7 @@
option(host_build)
QT += bootstrap_dbus-private
QT = core-private
force_bootstrap: QT += bootstrap_dbus-private
else: QT += dbus-private
DEFINES += QT_NO_CAST_FROM_ASCII
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS

View File

@ -1,4 +1,5 @@
option(host_build)
CONFIG += force_bootstrap # because of weird QLibraryInfo::location() reference
DEFINES += QDOC2_COMPAT \
QT_CRYPTOGRAPHICHASH_ONLY_SHA1

View File

@ -1,4 +1,5 @@
option(host_build)
CONFIG += force_bootstrap
DEFINES += QT_RCC QT_NO_CAST_FROM_ASCII