diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-10-16 16:12:54 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-16 16:39:49 +0300 |
commit | 795dcf9da430c55f2702793b80ce031bf11933db (patch) | |
tree | 98798cbee2339794283699f181eb65ff906cc04f /configure.ac | |
parent | canvas is null under Xdmx so createBitmap fails (diff) | |
download | core-795dcf9da430c55f2702793b80ce031bf11933db.tar.gz core-795dcf9da430c55f2702793b80ce031bf11933db.zip |
Make libc++ optional for iOS and use the right library in the Xcode projects
It seems that using libc++ when building with Xcode 4 (and iOS SDK 6)
you get linking errors. Stick to libstdc++ for now then with that.
Propagate the choice to the iOS Xcode projects through the lo.xcconfig
file.
Change-Id: Ic61dd2336066a77c4219c532106e3e50e85d0689
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 51a971604cd1..ca581e375190 100644 --- a/configure.ac +++ b/configure.ac @@ -2911,6 +2911,7 @@ if test $_os = iOS; then for sdkver in 7.0 6.1 6.0; do t=$xcode_developer/Platforms/$platform.platform/Developer/SDKs/$platform$sdkver.sdk if test -d $t; then + ios_sdk=$sdkver sysroot=$t break fi @@ -2956,9 +2957,27 @@ if test $_os = iOS; then # Just add -fvisibility=hidden to CC and CXX directly so that the 3rd-party libs also # get compiled with it, to avoid ld warnings when linking all that together into one # executable. - # Also, use libc++. + # Use libc++ if opted in only, and only when building against iOS 7 SDK or newer. + + XCODE_CLANG_CXX_LIBRARY=libstdc++ + case $ios_sdk in + 6.*) + if test "$enable_libc__" = yes; then + AC_MSG_ERROR([--enable-libc++ requires using Xcode 5 and iOS SDK 7 or newer it seems]) + fi + ;; + *) + if test "$enable_libc__" = yes; then + XCODE_CLANG_CXX_LIBRARY=libc++ + fi + ;; + esac + + stdlib="-stdlib=$XCODE_CLANG_CXX_LIBRARY" + CC="`xcrun -find clang` -arch $arch -fvisibility=hidden -isysroot $sysroot $lto $versionmin" - CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden -stdlib=libc++ -isysroot $sysroot $lto $versionmin" + CXX="`xcrun -find clang++` -arch $arch -fvisibility=hidden $stdlib -isysroot $sysroot $lto $versionmin" + INSTALL_NAME_TOOL=`xcrun -find install_name_tool` AR=`xcrun -find ar` NM=`xcrun -find nm` @@ -2967,6 +2986,8 @@ if test $_os = iOS; then RANLIB=`xcrun -find ranlib` fi +AC_SUBST(XCODE_CLANG_CXX_LIBRARY) + AC_MSG_CHECKING([whether to treat the installation as read-only]) if test \( -z "$enable_readonly_installset" -a "$ENABLE_MACOSX_SANDBOX" = TRUE \) -o \ |