From 68f22d84ab795d53b25635c641c47b1577f8fbc2 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Wed, 20 Jul 2016 10:12:59 +0300 Subject: Android: Add support for clang compiler [ChangeLog][Android] Added support for clang compiler Task-number: QTBUG-50724 Change-Id: I6147021b814fcb230d125c4450c554a7fea8f31e Reviewed-by: Eskil Abrahamsen Blomfeldt --- configure | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index e0228a9bfb..a1f0a8fecb 100755 --- a/configure +++ b/configure @@ -3016,7 +3016,10 @@ case "$XPLATFORM" in *unsupported*) ;; *android-g++*) - XPLATFORM_ANDROID=yes + XPLATFORM_ANDROID=g++ + ;; + *android-clang*) + XPLATFORM_ANDROID=clang ;; esac @@ -3220,7 +3223,7 @@ if ( [ "$CFG_XCB" = "system" ] || [ "$CFG_XCB" = "qt" ] ) && [ "$CFG_XKBCOMMON" exit 101 fi -if [ "$XPLATFORM_ANDROID" = "yes" ]; then +if [ "$XPLATFORM_ANDROID" != "no" ]; then if [ "$CFG_DBUS" = "auto" ]; then CFG_DBUS="no" fi @@ -3444,7 +3447,7 @@ QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX` TEST_COMPILER=$QMAKE_CONF_COMPILER -if [ "$XPLATFORM_ANDROID" = "yes" ] ; then +if [ "$XPLATFORM_ANDROID" != "no" ] ; then ANDROID_NDK_TOOLCHAIN_PREFIX= ANDROID_NDK_TOOLS_PREFIX= ANDROID_PLATFORM_ARCH= @@ -3484,7 +3487,11 @@ if [ "$XPLATFORM_ANDROID" = "yes" ] ; then exit 1 ;; esac - QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLCHAIN_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++ + if [ "$XPLATFORM_ANDROID" = "g++" ] ; then + QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLCHAIN_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++ + else + QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/clang++ + fi TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/" if [ "$CFG_ANDROID_STYLE_ASSETS" = "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG android-style-assets" @@ -4586,7 +4593,7 @@ elif [ "$CFG_ARCH" != "mips" ]; then fi [ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista" -[ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android" +[ "$XPLATFORM_ANDROID" != "no" ] && QMakeVar add styles "android" # check IPC support if ! compileTest unix/ipc_sysv "ipc_sysv" ; then -- cgit v1.2.3 From 77a71c32c9d19b87f79b208929e71282e8d8b5d9 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 7 Jul 2016 16:00:17 -0700 Subject: configure and mkspecs: Don't try to find xcrun with xcrun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Xcode 8 (beta 2) that tool is no longer available through xcrun. We resort to xcodebuild instead. Change-Id: If9d7b535c1cbac2caae0112b2003283aeff34fb9 Reviewed-by: Jake Petroules Reviewed-by: Oswald Buddenhagen Reviewed-by: Morten Johan Sørvig --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index a1f0a8fecb..f4c7813fd0 100755 --- a/configure +++ b/configure @@ -543,7 +543,7 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then exit 2 fi - if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then + if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then echo >&2 echo " Xcode not set up properly. You may need to confirm the license" >&2 echo " agreement by running /usr/bin/xcodebuild without arguments." >&2 -- cgit v1.2.3 From dd59118b87d779e5cbfcd0b4ee2a3d5332433da9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 7 Jul 2016 11:18:41 +0200 Subject: move c++11 test into qcompilerdetection.h and make it stricter it positively makes no sense to have a configure test which will be never reached due to the configure/qmake bootstrap failing with a slew of totally unhelpful error messages. pre-standardization partial c++11 implementations are now rejected, except for VS2013, which is still sufficient despite not announcing full compatibility. Change-Id: I58af10e03960af06b80cedac105cf8433f7a1745 Reviewed-by: Thiago Macieira --- configure | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index f2822503c4..0ba0c31e4a 100755 --- a/configure +++ b/configure @@ -4430,11 +4430,7 @@ fi # Detect C++11 & up support stdcxx_error=false -if ! compileTest common/c++11 "C++11"; then - echo "ERROR: Qt requires a C++11 compiler and yours does not seem to be that." - echo "Please upgrade." - exit 1 -elif [ "$CFG_STDCXX" = "c++11" ]; then +if [ "$CFG_STDCXX" = "c++11" ]; then : # CFG_STDCXX is correct elif ! compileTest common/c++14 "C++14"; then if [ "$CFG_STDCXX" != "auto" ]; then -- cgit v1.2.3