summaryrefslogtreecommitdiffstats
path: root/src/tools/bootstrap
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-03-26 13:01:36 +0100
committerLars Knoll <lars.knoll@qt.io>2020-04-13 09:40:09 +0200
commit33752a9bd334a53e891f141afd2357eefb1a9a36 (patch)
treeadf44eafe1d4201b49088d3d8592c0b83877101a /src/tools/bootstrap
parentce1d4d362881b54ff774b49f54ef686f9aa97c73 (diff)
Include QRegularExpression in the bootstrap library
This allows us to use regular expressions in bootstrapped tools such as moc and tracegen. Change-Id: I4310dd15bf26651aac6ab30c884e025ca06b3099 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/tools/bootstrap')
-rw-r--r--src/tools/bootstrap/.prev_CMakeLists.txt40
-rw-r--r--src/tools/bootstrap/CMakeLists.txt39
-rw-r--r--src/tools/bootstrap/bootstrap.pro7
3 files changed, 85 insertions, 1 deletions
diff --git a/src/tools/bootstrap/.prev_CMakeLists.txt b/src/tools/bootstrap/.prev_CMakeLists.txt
index b2ecf9d657..47e4877e20 100644
--- a/src/tools/bootstrap/.prev_CMakeLists.txt
+++ b/src/tools/bootstrap/.prev_CMakeLists.txt
@@ -10,6 +10,37 @@ qt_add_module(Bootstrap
NO_SYNC_QT
QMAKE_MODULE_CONFIG gc_binaries
SOURCES
+ ../../3rdparty/pcre2/src/config.h
+ ../../3rdparty/pcre2/src/pcre2.h
+ ../../3rdparty/pcre2/src/pcre2_auto_possess.c
+ ../../3rdparty/pcre2/src/pcre2_chartables.c
+ ../../3rdparty/pcre2/src/pcre2_compile.c
+ ../../3rdparty/pcre2/src/pcre2_config.c
+ ../../3rdparty/pcre2/src/pcre2_context.c
+ ../../3rdparty/pcre2/src/pcre2_dfa_match.c
+ ../../3rdparty/pcre2/src/pcre2_error.c
+ ../../3rdparty/pcre2/src/pcre2_extuni.c
+ ../../3rdparty/pcre2/src/pcre2_find_bracket.c
+ ../../3rdparty/pcre2/src/pcre2_internal.h
+ ../../3rdparty/pcre2/src/pcre2_intmodedep.h
+ ../../3rdparty/pcre2/src/pcre2_jit_compile.c
+ ../../3rdparty/pcre2/src/pcre2_maketables.c
+ ../../3rdparty/pcre2/src/pcre2_match.c
+ ../../3rdparty/pcre2/src/pcre2_match_data.c
+ ../../3rdparty/pcre2/src/pcre2_newline.c
+ ../../3rdparty/pcre2/src/pcre2_ord2utf.c
+ ../../3rdparty/pcre2/src/pcre2_pattern_info.c
+ ../../3rdparty/pcre2/src/pcre2_script_run.c
+ ../../3rdparty/pcre2/src/pcre2_serialize.c
+ ../../3rdparty/pcre2/src/pcre2_string_utils.c
+ ../../3rdparty/pcre2/src/pcre2_study.c
+ ../../3rdparty/pcre2/src/pcre2_substitute.c
+ ../../3rdparty/pcre2/src/pcre2_substring.c
+ ../../3rdparty/pcre2/src/pcre2_tables.c
+ ../../3rdparty/pcre2/src/pcre2_ucd.c
+ ../../3rdparty/pcre2/src/pcre2_ucp.h
+ ../../3rdparty/pcre2/src/pcre2_valid_utf.c
+ ../../3rdparty/pcre2/src/pcre2_xclass.c
../../corelib/codecs/qlatincodec.cpp
../../corelib/codecs/qtextcodec.cpp
../../corelib/codecs/qutfcodec.cpp
@@ -73,6 +104,7 @@ qt_add_module(Bootstrap
../../corelib/text/qlocale.cpp
../../corelib/text/qlocale_tools.cpp
../../corelib/text/qregexp.cpp
+ ../../corelib/text/qregularexpression.cpp
../../corelib/text/qstring.cpp
../../corelib/text/qstring_compat.cpp
../../corelib/text/qstringbuilder.cpp
@@ -99,6 +131,9 @@ qt_add_module(Bootstrap
../../xml/dom/qdom.cpp
../../xml/sax/qxml.cpp
DEFINES
+ HAVE_CONFIG_H
+ PCRE2_CODE_UNIT_WIDTH=16
+ PCRE2_DISABLE_JIT
QT_BOOTSTRAPPED
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
@@ -108,6 +143,7 @@ qt_add_module(Bootstrap
QT_VERSION_PATCH=
QT_VERSION_STR=\"\"
PUBLIC_DEFINES
+ PCRE2_CODE_UNIT_WIDTH=16
QT_BOOTSTRAPPED
QT_NO_CAST_TO_ASCII
QT_VERSION_MAJOR=
@@ -117,6 +153,8 @@ qt_add_module(Bootstrap
INCLUDE_DIRECTORIES
..
../../3rdparty/tinycbor/src
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/pcre2/src>
)
#### Keys ignored in scope 1:.:.:bootstrap.pro:<TRUE>:
@@ -155,6 +193,8 @@ qt_extend_target(Bootstrap CONDITION WIN32
../../corelib/kernel/qsystemsemaphore_win.cpp
../../corelib/kernel/qwinregistry.cpp
../../corelib/plugin/qsystemlibrary.cpp
+ PUBLIC_DEFINES
+ PCRE2_STATIC
PUBLIC_LIBRARIES
advapi32
netapi32
diff --git a/src/tools/bootstrap/CMakeLists.txt b/src/tools/bootstrap/CMakeLists.txt
index b7367e2d26..ccac76d184 100644
--- a/src/tools/bootstrap/CMakeLists.txt
+++ b/src/tools/bootstrap/CMakeLists.txt
@@ -11,6 +11,37 @@ add_library(Bootstrap STATIC)
# special case end
qt_extend_target(Bootstrap
SOURCES
+ ../../3rdparty/pcre2/src/config.h
+ ../../3rdparty/pcre2/src/pcre2.h
+ ../../3rdparty/pcre2/src/pcre2_auto_possess.c
+ ../../3rdparty/pcre2/src/pcre2_chartables.c
+ ../../3rdparty/pcre2/src/pcre2_compile.c
+ ../../3rdparty/pcre2/src/pcre2_config.c
+ ../../3rdparty/pcre2/src/pcre2_context.c
+ ../../3rdparty/pcre2/src/pcre2_dfa_match.c
+ ../../3rdparty/pcre2/src/pcre2_error.c
+ ../../3rdparty/pcre2/src/pcre2_extuni.c
+ ../../3rdparty/pcre2/src/pcre2_find_bracket.c
+ ../../3rdparty/pcre2/src/pcre2_internal.h
+ ../../3rdparty/pcre2/src/pcre2_intmodedep.h
+ ../../3rdparty/pcre2/src/pcre2_jit_compile.c
+ ../../3rdparty/pcre2/src/pcre2_maketables.c
+ ../../3rdparty/pcre2/src/pcre2_match.c
+ ../../3rdparty/pcre2/src/pcre2_match_data.c
+ ../../3rdparty/pcre2/src/pcre2_newline.c
+ ../../3rdparty/pcre2/src/pcre2_ord2utf.c
+ ../../3rdparty/pcre2/src/pcre2_pattern_info.c
+ ../../3rdparty/pcre2/src/pcre2_script_run.c
+ ../../3rdparty/pcre2/src/pcre2_serialize.c
+ ../../3rdparty/pcre2/src/pcre2_string_utils.c
+ ../../3rdparty/pcre2/src/pcre2_study.c
+ ../../3rdparty/pcre2/src/pcre2_substitute.c
+ ../../3rdparty/pcre2/src/pcre2_substring.c
+ ../../3rdparty/pcre2/src/pcre2_tables.c
+ ../../3rdparty/pcre2/src/pcre2_ucd.c
+ ../../3rdparty/pcre2/src/pcre2_ucp.h
+ ../../3rdparty/pcre2/src/pcre2_valid_utf.c
+ ../../3rdparty/pcre2/src/pcre2_xclass.c
../../corelib/codecs/qlatincodec.cpp
../../corelib/codecs/qtextcodec.cpp
../../corelib/codecs/qutfcodec.cpp
@@ -74,6 +105,7 @@ qt_extend_target(Bootstrap
../../corelib/text/qlocale.cpp
../../corelib/text/qlocale_tools.cpp
../../corelib/text/qregexp.cpp
+ ../../corelib/text/qregularexpression.cpp
../../corelib/text/qstring.cpp
../../corelib/text/qstring_compat.cpp
../../corelib/text/qstringbuilder.cpp
@@ -99,6 +131,10 @@ qt_extend_target(Bootstrap
../../corelib/tools/qversionnumber.cpp
../../xml/dom/qdom.cpp
../../xml/sax/qxml.cpp
+ DEFINES
+ HAVE_CONFIG_H
+ PCRE2_CODE_UNIT_WIDTH=16
+ PCRE2_DISABLE_JIT
PUBLIC_DEFINES # special case
QT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} # special case
QT_VERSION_MINOR=${PROJECT_VERSION_MINOR} # special case
@@ -113,6 +149,7 @@ qt_extend_target(Bootstrap
..
../../3rdparty/tinycbor/src
PUBLIC_INCLUDE_DIRECTORIES # special case
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/pcre2/src>
$<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES> # special case
$<TARGET_PROPERTY:Xml,INCLUDE_DIRECTORIES> # special case
PUBLIC_LIBRARIES # special case
@@ -155,6 +192,8 @@ qt_extend_target(Bootstrap CONDITION WIN32
../../corelib/kernel/qsystemsemaphore_win.cpp
../../corelib/kernel/qwinregistry.cpp
../../corelib/plugin/qsystemlibrary.cpp
+ PUBLIC_DEFINES
+ PCRE2_STATIC
PUBLIC_LIBRARIES
advapi32
netapi32
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 10d5fd4f95..eb267fc7bb 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -14,6 +14,9 @@ MODULE_DEFINES = \
QT_NO_CAST_TO_ASCII
MODULE_CONFIG = gc_binaries
+DEFINES += PCRE2_DISABLE_JIT
+include(../../3rdparty/pcre2/pcre2.pri)
+
DEFINES += \
$$MODULE_DEFINES \
QT_NO_FOREACH \
@@ -21,7 +24,8 @@ DEFINES += \
INCLUDEPATH += \
$$PWD/.. \
- $$PWD/../../3rdparty/tinycbor/src
+ $$PWD/../../3rdparty/tinycbor/src \
+ $$PWD/../../3rdparty/pcre2/src
SOURCES += \
../../corelib/codecs/qlatincodec.cpp \
@@ -87,6 +91,7 @@ SOURCES += \
../../corelib/text/qlocale.cpp \
../../corelib/text/qlocale_tools.cpp \
../../corelib/text/qregexp.cpp \
+ ../../corelib/text/qregularexpression.cpp \
../../corelib/text/qstring.cpp \
../../corelib/text/qstringbuilder.cpp \
../../corelib/text/qstring_compat.cpp \