a31b75b766
Glibc will use the intrinsics for 32- and 64-bit, but didn't for 16-bit (probably because GCC didn't document it until version 4.8), so this commit will make us access the intrinsics directly the intrisincs for all type sizes. Additionally, this will get us access to the compiler intrisics even without Glibc, such as when building against uclibc or Bionic. Another benefit is that both Clang and ICC will use the MOVBE instruction on Atom and Haswell architectures. Change-Id: I39d1891f479887d719d69ebe4ac92ac9bfeda8af Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
83 lines
3.3 KiB
Plaintext
83 lines
3.3 KiB
Plaintext
#
|
|
# W A R N I N G
|
|
# -------------
|
|
#
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
# implementation detail. It may change from version to version
|
|
# without notice, or even be removed.
|
|
#
|
|
# We mean it.
|
|
#
|
|
|
|
QMAKE_DIR_REPLACE_SANE += DESTDIR
|
|
CONFIG -= debug_and_release_target
|
|
|
|
contains(QT_CONFIG, c++11): CONFIG += c++11
|
|
contains(TEMPLATE, .*lib) {
|
|
# module and plugins
|
|
!host_build:contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols
|
|
unix:contains(QT_CONFIG, reduce_relocations): CONFIG += bsymbolic_functions
|
|
contains(QT_CONFIG, largefile): CONFIG += largefile
|
|
contains(QT_CONFIG, separate_debug_info): CONFIG += separate_debug_info
|
|
|
|
!isEmpty(_QMAKE_SUPER_CACHE_): \
|
|
rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
|
|
else: \
|
|
rplbase = $$MODULE_BASE_OUTDIR
|
|
host_build: \
|
|
qt_libdir = $$[QT_HOST_LIBS]
|
|
else: \
|
|
qt_libdir = $$[QT_INSTALL_LIBS/raw]
|
|
contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) {
|
|
lib_replace.match = "[^ ']*$$rplbase/lib"
|
|
lib_replace.replace =
|
|
} else {
|
|
lib_replace.match = $$rplbase/lib
|
|
lib_replace.replace = $$qt_libdir
|
|
}
|
|
lib_replace.CONFIG = path
|
|
QMAKE_PRL_INSTALL_REPLACE += lib_replace
|
|
}
|
|
|
|
warnings_are_errors:warning_clean {
|
|
# If the module declares that it has does its clean-up of warnings, enable -Werror.
|
|
# This setting is compiler-dependent anyway because it depends on the version of the
|
|
# compiler.
|
|
clang {
|
|
# Apple clang 4.0-4.2,5.0-5.1
|
|
# Regular clang 3.3 & 3.4
|
|
apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
|
|
reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
|
|
contains(apple_ver, "4\\.[012]|5\\.[01]")|contains(reg_ver, "3\\.[34]") {
|
|
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
|
|
}
|
|
} else:intel_icc:linux {
|
|
# Intel CC 13.0 - 15.0, on Linux only
|
|
ver = $${QT_ICC_MAJOR_VERSION}.$${QT_ICC_MINOR_VERSION}
|
|
linux:contains(ver, "(1[34]\\.|15\\.0)") {
|
|
# 177: function "entity" was declared but never referenced
|
|
# (too aggressive; ICC reports even for functions created due to template instantiation)
|
|
# 1224: #warning directive
|
|
# 1478: function "entity" (declared at line N) was declared deprecated
|
|
# 1881: argument must be a constant null pointer value
|
|
# (NULL in C++ is usually a literal 0)
|
|
QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR
|
|
}
|
|
} else:gcc:!clang:!intel_icc {
|
|
# GCC 4.6-4.9
|
|
ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
|
|
contains(ver, "4\\.[6789]") {
|
|
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR
|
|
|
|
# GCC prints this bogus warning, after it has inlined a lot of code
|
|
# error: assuming signed overflow does not occur when assuming that (X + c) < X is always false
|
|
QMAKE_CXXFLAGS_WARN_ON += -Wno-error=strict-overflow
|
|
|
|
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
|
|
android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
|
|
}
|
|
}
|
|
unset(ver)
|
|
}
|
|
|