Changeset 0a5d205 in rtems-tools for trace/wscript


Ignore:
Timestamp:
06/08/20 06:52:10 (3 years ago)
Author:
Christian Mauderer <christian.mauderer@…>
Branches:
5
Children:
56779ec
Parents:
e621fd9
git-author:
Christian Mauderer <christian.mauderer@…> (06/08/20 06:52:10)
git-committer:
Christian Mauderer <christian.mauderer@…> (08/17/21 09:21:07)
Message:

trace: Use c++14 instead of c++11 if possible

llvm version 10 uses features from c++14 standard in the headers. With
that, the record/record-main-lttng.cc doesn't build any more. This patch
makes sure that c++14 is used if it is available.

Updates #4495

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trace/wscript

    re621fd9 r0a5d205  
    4646        conf.check_cxx(lib = 'z')
    4747    conf.check_cxx(lib = 'ws2_32', mandatory=False)
     48    conf.check_cxx(cxxflags='-std=c++14', mandatory=False, define_name="HAVE_STD_CXX14")
    4849    conf.write_config_header('config.h')
    4950
     
    6162    conf['optflags'] = bld.env.C_OPTS
    6263    conf['cflags'] = ['-pipe', '-g'] + conf['optflags']
    63     conf['cxxflags'] = ['-std=c++11'] + conf['cflags']
     64    cxxstd = '-std=c++11'
     65    if bld.env.HAVE_STD_CXX14:
     66        cxxstd = '-std=c++14'
     67    conf['cxxflags'] = [cxxstd] + conf['cflags']
    6468    conf['linkflags'] = ['-g']
    6569    conf['lib'] = []
Note: See TracChangeset for help on using the changeset viewer.