Qt: Optimisations for ARM desktop/tablet hosts.

This commit is contained in:
Sacha 2014-06-17 14:23:16 +10:00
parent f5b664daac
commit 53642d3cc4
3 changed files with 17 additions and 14 deletions

View File

@ -92,8 +92,7 @@ SOURCES += $$P/native/audio/*.cpp \
$$P/native/math/expression_parser.cpp \
$$P/native/math/math_util.cpp \
$$P/native/math/lin/*.cpp \
$$P/native/math/fast/fast_math.c \
$$P/native/math/fast/fast_matrix.c \
$$P/native/math/fast/*.c \
$$P/native/net/*.cpp \
$$P/native/profiler/profiler.cpp \
$$P/native/thread/*.cpp \
@ -104,12 +103,7 @@ SOURCES += $$P/native/audio/*.cpp \
$$P/native/util/text/utf8.cpp \
$$P/native/util/text/parsers.cpp
!arm {
SOURCES += $$files($$P/native/math/fast/fast_matrix_sse.c)
}
armv7 {
SOURCES += $$files($$P/native/math/fast/fast_matrix_neon.S)
}
armv7: SOURCES += $$files($$P/native/math/fast/fast_matrix_neon.S)
HEADERS += $$P/native/audio/*.h \
@ -137,6 +131,7 @@ HEADERS += $$P/native/audio/*.h \
$$P/native/input/*.h \
$$P/native/math/*.h \
$$P/native/math/lin/*.h \
$$P/native/math/fast/*.h \
$$P/native/net/*.h \
$$P/native/profiler/profiler.h \
$$P/native/thread/*.h \
@ -148,4 +143,3 @@ HEADERS += $$P/native/audio/*.h \
$$P/native/util/text/parsers.h
INCLUDEPATH += $$P/native

View File

@ -77,7 +77,7 @@ linux:!android: LIBS += -ldl -lrt -lz
macx: LIBS += -liconv
qnx: LIBS += -lscreen
symbian: LIBS += -lremconcoreapi -lremconinterfacebase
android: LIBS += -lEGL
linux:arm|android: LIBS += -lEGL
unix:contains(QT_CONFIG, system-zlib) {
LIBS += -lz
}

View File

@ -30,7 +30,10 @@ win32-msvc* {
QMAKE_CXXFLAGS += -ffast-math -fno-strict-aliasing
greaterThan(QT_MAJOR_VERSION,4): CONFIG+=c++11
else: QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -O3
QMAKE_CFLAGS_RELEASE ~= s/-O.*/
QMAKE_CXXFLAGS_RELEASE ~= s/-O.*/
QMAKE_CFLAGS_RELEASE += -O3
QMAKE_CXXFLAGS_RELEASE += -O3
}
# Arch specific
xarch = $$find(QT_ARCH, "86")
@ -42,15 +45,21 @@ macx|contains(QT_ARCH, windows)|count(xarch, 1) {
}
arm:!symbian {
CONFIG += armv7
QMAKE_CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp
QMAKE_CXXFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math -mfloat-abi=softfp
QMAKE_CFLAGS_RELEASE ~= s/-mfpu.*/
QMAKE_CFLAGS_DEBUG ~= s/-mfpu.*/
QMAKE_CFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
QMAKE_CFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
QMAKE_CXXFLAGS_RELEASE += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
QMAKE_CXXFLAGS_DEBUG += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -ftree-vectorize -ffast-math
}
gleslib = $$find(QT_CONFIG, "opengles")
count(gleslib,0) { # OpenGL
INCLUDEPATH += $$P/native/ext/glew
} else {
DEFINES += USING_GLES2 MOBILE_DEVICE
DEFINES += USING_GLES2
// Lets hardcode this. How else do we know if the environment prefers windows?
!linux|android|maemo: DEFINES += MOBILE_DEVICE
CONFIG += mobile_platform
}