Specify C++ language standard for tcecc using new option '--std=<std>'
@@ -385,6 +385,9 @@ def processInputFiles(inFiles, tmpDir, options, tceopsDir=None):
if options.soft_float:
extra_opts += " -ffp-contract=off"
+ if options.cxxstd:
+ extra_opts += " --std=%s" % options.cxxstd
+
command = ("clang %s %s %s -emit-llvm " +\
"-O%d "\
"-c -I" + tmpDir + \
@@ -1094,6 +1097,11 @@ p.add_option('--init-sp',
dest='init_sp', default=None,
help="Set the initial stack pointer of the program to the given value.")
+p.add_option('--std',
+ type="string", action="store", metavar='value',
+ dest='cxxstd', default='c++11',
+ help="C++ language standard to compile for.")
+
p.add_option('--little-endian',
action="store_true", dest='little_endian', default=False,
help="Compile using the little-endian TCE target.")
