[libcxx] r249226 - [libcxx] Use newest supported language dialect when running the test suite.

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 3 15:59:40 PDT 2015


Hello Eric,

it looks like this patch broke the lab.llvm.org buildbots (darwin+cmake):

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/7544/consoleFull#2729576478254eaf0-7326-4999-85b0-388101f2d404

could you please investigate and/or revert the change?

thanks,
Adrian

> On Oct 2, 2015, at 7:32 PM, Eric Fiselier via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
> Author: ericwf
> Date: Fri Oct  2 21:32:23 2015
> New Revision: 249226
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=249226&view=rev
> Log:
> [libcxx] Use newest supported language dialect when running the test suite.
> 
> Summary:
> Currently the test suite defaults to C++11 mode if no standard version is supplied to LIT using `--param=std=c++XX`.  This patch changes that behavior so that the newest possible dialect is selected instead.
> 
> I have already patched the C++11 bot to explicitly specify `--param=std=c++11`. I'm just putting this up for review to see if anybody objects to this idea.
> 
> Reviewers: mclow.lists, jroelofs, danalbert
> 
> Subscribers: cfe-commits
> 
> Differential Revision: http://reviews.llvm.org/D13331
> 
> Modified:
>    libcxx/trunk/test/libcxx/test/config.py
> 
> Modified: libcxx/trunk/test/libcxx/test/config.py
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=249226&r1=249225&r2=249226&view=diff
> ==============================================================================
> --- libcxx/trunk/test/libcxx/test/config.py (original)
> +++ libcxx/trunk/test/libcxx/test/config.py Fri Oct  2 21:32:23 2015
> @@ -344,7 +344,20 @@ class Configuration(object):
>         # Try and get the std version from the command line. Fall back to
>         # default given in lit.site.cfg is not present. If default is not
>         # present then force c++11.
> -        std = self.get_lit_conf('std', 'c++11')
> +        std = self.get_lit_conf('std')
> +        if not std:
> +            # Choose the newest possible language dialect if none is given.
> +            possible_stds = ['c++1z', 'c++14', 'c++11', 'c++03']
> +            for s in possible_stds:
> +                if self.cxx.hasCompileFlag('-std=%s' % s):
> +                    std = s
> +                    self.lit_config.note(
> +                        'inferred language dialect as: %s' % std)
> +                    break
> +            if not std:
> +                self.lit_config.fatal(
> +                    'Failed to infer a supported language dialect from one of %r'
> +                    % possible_stds)
>         self.cxx.compile_flags += ['-std={0}'.format(std)]
>         self.config.available_features.add(std)
>         # Configure include paths
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list