qfloat16: Check in the tables to Git
It's a 38k source file, which makes it MUCH smaller than other generated files like qlocale_data_p.h (982k) and qunicodetables.cpp (718k). The constants are platform-independent, since they are defined by IEEE 754, so they will never change. The generator tool is moved to util/ and removed from the build. That's one fewer bootstrapped tool to have to worry about. The output file is committed as .cpp so it won't get installed. Fixes: QTBUG-76165 Change-Id: I2b1955a995ad40f3b89afffd15a3ded58dc3e35f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
26e5aa45e1
commit
5e40d3d982
2
.gitignore
vendored
2
.gitignore
vendored
@ -56,8 +56,6 @@ qt*-config.pri
|
||||
/src/angle/src/QtANGLE/libANGLE/
|
||||
/src/angle/src/libGLESv2/libANGLE/
|
||||
|
||||
/src/corelib/global/qfloat16tables.cpp
|
||||
|
||||
/examples/*/*/*
|
||||
!/examples/*/*/*[.]*
|
||||
!/examples/*/*/README
|
||||
|
@ -40,6 +40,10 @@ SOURCES += \
|
||||
global/qrandom.cpp \
|
||||
global/qhooks.cpp
|
||||
|
||||
# To get listed in IDEs
|
||||
false: SOURCES += \
|
||||
global/qfloat16tables.cpp
|
||||
|
||||
# Only add global/qfloat16_f16c.c if qfloat16.cpp can't #include it.
|
||||
# Any compiler: if it is already generating F16C code, let qfloat16.cpp do it
|
||||
# Clang: ICE if not generating F16C code, so use qfloat16_f16c.c
|
||||
@ -124,14 +128,3 @@ gcc:ltcg {
|
||||
} else {
|
||||
SOURCES += $$VERSIONTAGGING_SOURCES
|
||||
}
|
||||
|
||||
QMAKE_QFLOAT16_TABLES_GENERATE = global/qfloat16.h
|
||||
|
||||
qtPrepareTool(QMAKE_QFLOAT16_TABLES, qfloat16-tables)
|
||||
|
||||
qfloat16_tables.commands = $$QMAKE_QFLOAT16_TABLES > ${QMAKE_FILE_OUT}
|
||||
qfloat16_tables.output = global/qfloat16tables.cpp
|
||||
qfloat16_tables.depends = $$QMAKE_QFLOAT16_TABLES_EXE
|
||||
qfloat16_tables.input = QMAKE_QFLOAT16_TABLES_GENERATE
|
||||
qfloat16_tables.variable_out = SOURCES
|
||||
QMAKE_EXTRA_COMPILERS += qfloat16_tables
|
||||
|
@ -239,6 +239,7 @@ Q_CORE_EXPORT void qFloatFromFloat16(float *out, const qfloat16 *in, qsizetype l
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "qfloat16tables.cpp"
|
||||
#ifdef QFLOAT16_INCLUDE_FAST
|
||||
# include "qfloat16_f16c.c"
|
||||
#endif
|
||||
|
3266
src/corelib/global/qfloat16tables.cpp
Normal file
3266
src/corelib/global/qfloat16tables.cpp
Normal file
File diff suppressed because it is too large
Load Diff
10
src/src.pro
10
src/src.pro
@ -21,10 +21,6 @@ src_tools_rcc.subdir = tools/rcc
|
||||
src_tools_rcc.target = sub-rcc
|
||||
src_tools_rcc.depends = src_tools_bootstrap
|
||||
|
||||
src_tools_qfloat16_tables.subdir = tools/qfloat16-tables
|
||||
src_tools_qfloat16_tables.target = sub-qfloat16-tables
|
||||
src_tools_qfloat16_tables.depends = src_tools_bootstrap
|
||||
|
||||
src_tools_qlalr.subdir = tools/qlalr
|
||||
src_tools_qlalr.target = sub-qlalr
|
||||
force_bootstrap: src_tools_qlalr.depends = src_tools_bootstrap
|
||||
@ -72,7 +68,7 @@ src_winmain.depends = sub-corelib # just for the module .pri file
|
||||
|
||||
src_corelib.subdir = $$PWD/corelib
|
||||
src_corelib.target = sub-corelib
|
||||
src_corelib.depends = src_tools_moc src_tools_rcc src_tools_qfloat16_tables
|
||||
src_corelib.depends = src_tools_moc src_tools_rcc
|
||||
|
||||
src_xml.subdir = $$PWD/xml
|
||||
src_xml.target = sub-xml
|
||||
@ -159,12 +155,12 @@ src_android.subdir = $$PWD/android
|
||||
src_3rdparty_freetype.depends += src_corelib
|
||||
}
|
||||
}
|
||||
SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_qfloat16_tables
|
||||
SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc
|
||||
qtConfig(regularexpression):pcre2 {
|
||||
SUBDIRS += src_3rdparty_pcre2
|
||||
src_corelib.depends += src_3rdparty_pcre2
|
||||
}
|
||||
TOOLS = src_tools_moc src_tools_rcc src_tools_qlalr src_tools_qfloat16_tables
|
||||
TOOLS = src_tools_moc src_tools_rcc src_tools_qlalr
|
||||
!force_bootstrap:if(qtConfig(lttng)|qtConfig(etw)) {
|
||||
SUBDIRS += src_tools_tracegen
|
||||
src_corelib.depends += src_tools_tracegen
|
||||
|
@ -1,9 +0,0 @@
|
||||
option(host_build)
|
||||
|
||||
CONFIG -= qt
|
||||
SOURCES += gen_qfloat16_tables.cpp
|
||||
|
||||
load(qt_tool)
|
||||
|
||||
lib.CONFIG = dummy_install
|
||||
INSTALLS = lib
|
2
util/qfloat16-tables/qfloat16-tables.pro
Normal file
2
util/qfloat16-tables/qfloat16-tables.pro
Normal file
@ -0,0 +1,2 @@
|
||||
QT = core
|
||||
SOURCES += gen_qfloat16_tables.cpp
|
Loading…
Reference in New Issue
Block a user