[libcxxabi] r243752 - [libc++abi] Allow use just compiled clang++ for tests

Eric Fiselier eric at efcs.ca
Fri Jul 31 09:14:39 PDT 2015


Cool, I might steal this for libc++ if you don't mind. libc++abi still
builds with the compiler used to build clang though right? It would be
useful to build libc++ and libc++abi with the just build clang but I
wouldn't want to make clang a CMake dependancy of libc++abi. Have you
given this any thought before?

On Fri, Jul 31, 2015 at 11:25 AM, Renato Golin <renato.golin at linaro.org> wrote:
> Author: rengolin
> Date: Fri Jul 31 10:25:11 2015
> New Revision: 243752
>
> URL: http://llvm.org/viewvc/llvm-project?rev=243752&view=rev
> Log:
> [libc++abi] Allow use just compiled clang++ for tests
>
> Currently, the tests assume the system compiler is the one we want
> to test, but if we build libcxxabi together with LLVM+Clang, it'll
> get the wrong compiler.
>
> This patch allows us to test if we have clang++ in our /bin directory,
> and if so, use it.
>
> Modified:
>     libcxxabi/trunk/test/lit.cfg
>
> Modified: libcxxabi/trunk/test/lit.cfg
> URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.cfg?rev=243752&r1=243751&r2=243752&view=diff
> ==============================================================================
> --- libcxxabi/trunk/test/lit.cfg (original)
> +++ libcxxabi/trunk/test/lit.cfg Fri Jul 31 10:25:11 2015
> @@ -53,6 +53,11 @@ if obj_root is None:
>
>  config.test_exec_root = os.path.join(obj_root, 'test')
>
> +# Check if we have produced a Clang with this build (in-tree)
> +this_clang = os.path.join(obj_root, '../../bin/clang++')
> +if os.path.exists(this_clang):
> +    config.cxx_under_test = this_clang
> +
>  cfg_variant = getattr(config, 'configuration_variant', 'libcxxabi')
>  if cfg_variant:
>      print 'Using configuration variant: %s' % cfg_variant
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list