Clean up building of bootstrap lib and tools
Add a qconfig-bootstrap.h, which contains all the defines required to build the bootstrapped tools. This will be required anyway when moving more code over to use QT_CONFIG(foo) instead of QT_NO_FOO. Change-Id: I783d0aa0100b9190fe2d422bee4a95b05720aebe Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
91cde06296
commit
267dd9133d
|
|
@ -99,15 +99,12 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \
|
|||
-I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \
|
||||
-I$(INC_PATH) -I$(INC_PATH)/QtCore \
|
||||
-I$(INC_PATH)/QtCore/$(QT_VERSION) -I$(INC_PATH)/QtCore/$(QT_VERSION)/QtCore \
|
||||
-I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \
|
||||
-I$(BUILD_PATH)/src/corelib/global \
|
||||
-I$(QMAKESPEC) \
|
||||
-I$(SOURCE_PATH)/tools/shared \
|
||||
-DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \
|
||||
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \
|
||||
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \
|
||||
-DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
|
||||
-DQT_NO_FOREACH \
|
||||
-DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS
|
||||
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \
|
||||
-DQT_NO_FOREACH
|
||||
|
||||
CXXFLAGS = $(EXTRA_CXXFLAGS) $(CPPFLAGS)
|
||||
|
||||
|
|
|
|||
|
|
@ -40,15 +40,12 @@ CFLAGS_BARE = -c -Fo./ -Fdqmake.pdb \
|
|||
$(CFLAGS_EXTRA) \
|
||||
-I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac -I$(QMKSRC)\generators\integrity \
|
||||
-I$(INC_PATH) -I$(INC_PATH)\QtCore -I$(INC_PATH)\QtCore\$(QT_VERSION) -I$(INC_PATH)\QtCore\$(QT_VERSION)\QtCore \
|
||||
-I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \
|
||||
-I$(BUILD_PATH)\src\corelib\global \
|
||||
-I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \
|
||||
-I$(SOURCE_PATH)\tools\shared \
|
||||
-DQT_VERSION_STR=\"$(QT_VERSION)\" -DQT_VERSION_MAJOR=$(QT_MAJOR_VERSION) -DQT_VERSION_MINOR=$(QT_MINOR_VERSION) -DQT_VERSION_PATCH=$(QT_PATCH_VERSION) \
|
||||
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \
|
||||
-DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \
|
||||
-DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \
|
||||
-DQT_NO_FOREACH \
|
||||
-DUNICODE -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS
|
||||
-DQT_NO_FOREACH -DUNICODE
|
||||
CFLAGS = $(CFLAGS_PCH) $(CFLAGS_BARE) $(CFLAGS)
|
||||
|
||||
CXXFLAGS_BARE = $(CFLAGS_BARE)
|
||||
|
|
|
|||
|
|
@ -151,11 +151,7 @@ bootstrap { #Qt code
|
|||
LFLAGS += -lcpp
|
||||
}
|
||||
|
||||
DEFINES += \
|
||||
QT_BOOTSTRAPPED \
|
||||
QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_NO_COMPONENT QT_NO_COMPRESS \
|
||||
QT_NO_THREAD QT_NO_QOBJECT QT_NO_GEOM_VARIANT QT_NO_DATASTREAM \
|
||||
QT_CRYPTOGRAPHICHASH_ONLY_SHA1 QT_JSON_READONLY QT_NO_STANDARDPATHS
|
||||
DEFINES += QT_BOOTSTRAPPED
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$QT.core.includes $$QT.core_private.includes \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,95 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
// Despite its file name, this really is not a public header.
|
||||
// It is an implementation detail of the private bootstrap library.
|
||||
//
|
||||
|
||||
#if 0
|
||||
// silence syncqt warnings
|
||||
#pragma qt_sync_skip_header_check
|
||||
#pragma qt_sync_stop_processing
|
||||
#endif
|
||||
|
||||
#ifdef QT_BOOTSTRAPPED
|
||||
|
||||
#ifndef QT_NO_EXCEPTIONS
|
||||
#define QT_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#define QT_NO_USING_NAMESPACE
|
||||
#define QT_NO_DEPRECATED
|
||||
|
||||
#define QT_CRYPTOGRAPHICHASH_ONLY_SHA1
|
||||
#define QT_NO_DATASTREAM
|
||||
#define QT_NO_LIBRARY
|
||||
#define QT_FEATURE_library -1
|
||||
#define QT_NO_QOBJECT
|
||||
#define QT_NO_SYSTEMLOCALE
|
||||
#define QT_NO_THREAD
|
||||
#define QT_NO_TRANSLATION
|
||||
#define QT_FEATURE_translation -1
|
||||
#define QT_NO_GEOM_VARIANT
|
||||
|
||||
#if defined(QT_BUILD_QMAKE) || defined(QT_BUILD_CONFIGURE)
|
||||
#define QT_NO_COMPRESS
|
||||
#define QT_JSON_READONLY
|
||||
#define QT_NO_TEXTCODEC
|
||||
#define QT_FEATURE_textcodec -1
|
||||
#else
|
||||
#define QT_FEATURE_textcodec 1
|
||||
#define QT_NO_CODECS
|
||||
#define QT_FEATURE_codecs -1
|
||||
#endif
|
||||
|
||||
#if defined(QT_BUILD_QMAKE)
|
||||
#define QT_NO_STANDARDPATHS
|
||||
#endif
|
||||
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
|
|
@ -56,7 +56,9 @@
|
|||
*/
|
||||
#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
|
||||
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
#ifdef QT_BOOTSTRAPPED
|
||||
#include <QtCore/qconfig-bootstrapped.h>
|
||||
#else
|
||||
#include <QtCore/qconfig.h>
|
||||
#include <QtCore/qtcore-config.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -11,22 +11,10 @@ MODULE_DEFINES = \
|
|||
QT_VERSION_MINOR=$$QT_MINOR_VERSION \
|
||||
QT_VERSION_PATCH=$$QT_PATCH_VERSION \
|
||||
QT_BOOTSTRAPPED \
|
||||
QT_LITE_UNICODE \
|
||||
QT_NO_CAST_TO_ASCII \
|
||||
QT_NO_CODECS \
|
||||
QT_NO_DATASTREAM \
|
||||
QT_NO_LIBRARY \
|
||||
QT_NO_QOBJECT \
|
||||
QT_NO_SYSTEMLOCALE \
|
||||
QT_NO_THREAD \
|
||||
QT_NO_UNICODETABLES \
|
||||
QT_NO_USING_NAMESPACE \
|
||||
QT_NO_DEPRECATED \
|
||||
QT_NO_TRANSLATION
|
||||
QT_NO_CAST_TO_ASCII
|
||||
|
||||
DEFINES += \
|
||||
$$MODULE_DEFINES \
|
||||
QT_CRYPTOGRAPHICHASH_ONLY_SHA1 \
|
||||
QT_NO_FOREACH \
|
||||
QT_NO_CAST_FROM_ASCII
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ CONFSRC = $(TOOLSRC)/configure
|
|||
|
||||
RAW_PCH = configure_pch.h
|
||||
PCH = $(RAW_PCH).gch/c++
|
||||
DEFINES = -DUNICODE -DQT_NO_DATASTREAM -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH)
|
||||
DEFINES = -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH)
|
||||
INCPATH = -I"../../include" -I"../../include/QtCore" -I"../../include/QtCore/$(QTVERSION)" -I"../../include/QtCore/$(QTVERSION)/QtCore" -I"$(TOOLSRC)/shared" -I"$(QTSRC)mkspecs/win32-g++"
|
||||
CXXFLAGS_BARE = -std=c++11 -fno-rtti -fno-exceptions -mthreads -Wall -Wextra $(DEFINES) $(INCPATH)
|
||||
CXXFLAGS = -include $(RAW_PCH) $(CXXFLAGS_BARE)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ CORESRC = $(QTSRC)src\corelib
|
|||
TOOLSRC = $(QTSRC)tools
|
||||
CONFSRC = $(TOOLSRC)\configure
|
||||
|
||||
DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH)
|
||||
DEFINES = -DUNICODE -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH)
|
||||
INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2012"
|
||||
CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH)
|
||||
!IF ("$(CXX)" != "clang-cl")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ DESTDIR = $$PWD/../.. # build directly in source dir
|
|||
|
||||
CONFIG += console flat stl rtti_off
|
||||
CONFIG -= moc qt
|
||||
DEFINES = UNICODE QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_COMPRESS QT_NO_THREAD QT_NO_QOBJECT QT_NO_GEOM_VARIANT _CRT_SECURE_NO_DEPRECATE QT_USE_QSTRINGBUILDER
|
||||
DEFINES = UNICODE _CRT_SECURE_NO_DEPRECATE QT_USE_QSTRINGBUILDER
|
||||
DEFINES += QT_BOOTSTRAPPED QT_BUILD_CONFIGURE
|
||||
|
||||
win32 : LIBS += -lole32 -ladvapi32
|
||||
|
|
|
|||
Loading…
Reference in New Issue