I’m not familiar with those performance issues, so I’m CC’ing Howard in case he 
can provide any details on those issues.  In general, we’re in the process of 
migrating away from libstdc++ on OS X and iOS, so we really do want the default 
to be libc++ regardless of the language mode.  If you have particularly 
performance sensitive code, you can always choose to use libstdc++.

On Nov 2, 2013, at 7:05 PM, Nico Weber <[email protected]> wrote:

> Thanks for upstreaming this!
> 
> Should this only happen in C++11 mode? libc++ seems to be measurably slower 
> than libstdc++ in C++03 mode (PR17703, PR14554, PR14555).
> 
> 
> On Sat, Nov 2, 2013 at 4:19 PM, Bob Wilson <[email protected]> wrote:
> Author: bwilson
> Date: Sat Nov  2 18:19:53 2013
> New Revision: 193934
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=193934&view=rev
> Log:
> Default to use libc++ on OS X 10.9+ and iOS 7+.
> 
> Modified:
>     cfe/trunk/lib/Driver/ToolChains.cpp
>     cfe/trunk/test/PCH/cxx-typeid.cpp
> 
> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=193934&r1=193933&r2=193934&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains.cpp Sat Nov  2 18:19:53 2013
> @@ -839,6 +839,12 @@ DerivedArgList *Darwin::TranslateArgs(co
>      }
>    }
> 
> +  // Default to use libc++ on OS X 10.9+ and iOS 7+.
> +  if (((isTargetMacOS() && !isMacosxVersionLT(10, 9)) ||
> +       (isTargetIPhoneOS() && !isIPhoneOSVersionLT(7, 0))) &&
> +      !Args.getLastArg(options::OPT_stdlib_EQ))
> +    DAL->AddJoinedArg(0, Opts.getOption(options::OPT_stdlib_EQ), "libc++");
> +
>    // Validate the C++ standard library choice.
>    CXXStdlibType Type = GetCXXStdlibType(*DAL);
>    if (Type == ToolChain::CST_Libcxx) {
> 
> Modified: cfe/trunk/test/PCH/cxx-typeid.cpp
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/cxx-typeid.cpp?rev=193934&r1=193933&r2=193934&view=diff
> ==============================================================================
> --- cfe/trunk/test/PCH/cxx-typeid.cpp (original)
> +++ cfe/trunk/test/PCH/cxx-typeid.cpp Sat Nov  2 18:19:53 2013
> @@ -1,8 +1,8 @@
>  // Test this without pch.
> -// RUN: %clang_cc1 -include %S/cxx-typeid.h -fsyntax-only -verify %s
> +// RUN: %clang_cc1 -include %S/cxx-typeid.h -fsyntax-only -stdlib=libstdc++ 
> -verify %s
> 
> -// RUN: %clang_cc1 -x c++-header -emit-pch -o %t.pch %S/cxx-typeid.h
> -// RUN: %clang_cc1 -include-pch %t.pch -fsyntax-only -verify %s
> +// RUN: %clang_cc1 -x c++-header -emit-pch -stdlib=libstdc++ -o %t.pch 
> %S/cxx-typeid.h
> +// RUN: %clang_cc1 -include-pch %t.pch -fsyntax-only -stdlib=libstdc++ 
> -verify %s
> 
>  // expected-no-diagnostics
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to