Make the use of -ffunction-sections more generic in Qt
Move it from bootstrap.pro into qt_module.prf so it will apply to any other bootstrapped libraries, like libQmlDevTools. Variable called "SPLIT_SECTIONS" because -fdata-sections could be added in the future, if it proves to be a benefit. Change-Id: I3fbb004f111620a84e58e9112e9bce3afd95631e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
49dc7d2b8c
commit
199b2594ff
@ -47,6 +47,7 @@ QMAKE_CFLAGS_ISYSTEM = -isystem
|
||||
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
|
||||
QMAKE_CFLAGS_EXCEPTIONS_OFF += -fno-exceptions
|
||||
QMAKE_CFLAGS_SPLIT_SECTIONS += -ffunction-sections
|
||||
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
|
||||
@ -60,6 +61,7 @@ QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
|
||||
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
|
||||
QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
|
||||
|
||||
QMAKE_LFLAGS +=
|
||||
QMAKE_LFLAGS_DEBUG +=
|
||||
|
@ -29,6 +29,8 @@ host_build|staticlib: CONFIG += static
|
||||
|
||||
host_build {
|
||||
QT -= gui # no host module will ever use gui
|
||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_SPLIT_SECTIONS
|
||||
force_bootstrap {
|
||||
!build_pass: CONFIG += release
|
||||
contains(QT, core(-private)?|xml) {
|
||||
|
@ -23,6 +23,7 @@ QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
||||
QMAKE_CFLAGS_YACC =
|
||||
QMAKE_CFLAGS_ISYSTEM = -isystem
|
||||
QMAKE_CFLAGS_THREAD = -D_REENTRANT
|
||||
QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
|
||||
|
||||
QMAKE_CFLAGS_SSE2 += -xSSE2
|
||||
QMAKE_CFLAGS_SSE3 += -xSSE3
|
||||
@ -44,6 +45,7 @@ QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
|
||||
QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
|
||||
# Disabling exceptions disabled - workaround for QTBUG-36577
|
||||
#QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
|
||||
QMAKE_CXXFLAGS_CXX11 = -std=c++0x
|
||||
|
@ -22,6 +22,7 @@ QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables
|
||||
QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
|
||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_THREAD =
|
||||
QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
|
||||
|
||||
QMAKE_CFLAGS_SSE2 += -xSSE2
|
||||
QMAKE_CFLAGS_SSE3 += -xSSE3
|
||||
@ -51,6 +52,7 @@ QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
|
||||
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
|
||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
QMAKE_CXXFLAGS_CXX11 = -std=c++11
|
||||
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
|
||||
|
||||
QMAKE_LINK = icpc
|
||||
QMAKE_LINK_SHLIB = icpc
|
||||
|
@ -32,6 +32,7 @@ QMAKE_CFLAGS_WARN_OFF = -w
|
||||
QMAKE_CFLAGS_RELEASE = -O2
|
||||
QMAKE_CFLAGS_DEBUG = -g
|
||||
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
|
||||
QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
|
||||
QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign
|
||||
QMAKE_CFLAGS_SSE3 = -msse3
|
||||
QMAKE_CFLAGS_SSSE3 = -mssse3
|
||||
@ -56,6 +57,7 @@ QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
|
||||
QMAKE_CXXFLAGS_CXX11 = -std=c++0x
|
||||
QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
|
||||
|
||||
QMAKE_INCDIR =
|
||||
|
||||
|
@ -145,8 +145,6 @@ macx {
|
||||
../../corelib/io/qstandardpaths_win.cpp
|
||||
}
|
||||
|
||||
*-g++*: QMAKE_CXXFLAGS += -ffunction-sections
|
||||
|
||||
if(contains(QT_CONFIG, zlib)|cross_compile):include(../../3rdparty/zlib.pri)
|
||||
else:include(../../3rdparty/zlib_dependency.pri)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user