summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-01-28 00:05:48 +0000
committerEric Fiselier <eric@efcs.ca>2015-01-28 00:05:48 +0000
commitb06fe2a704e5132b53f3826823c37caafe5dc23b (patch)
treee55afc5c21f68372f9432cd22a88f0bbd5c3b3d2 /libcxx/test
parent308b171318565bcc2a7be85d03aec9a3c3021403 (diff)
downloadbcm5719-llvm-b06fe2a704e5132b53f3826823c37caafe5dc23b.tar.gz
bcm5719-llvm-b06fe2a704e5132b53f3826823c37caafe5dc23b.zip
Fix flag order of -xc++ in CXXCompiler.
llvm-svn: 227273
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/libcxx/compiler.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxx/test/libcxx/compiler.py b/libcxx/test/libcxx/compiler.py
index ca546f97fa5..4828874240d 100644
--- a/libcxx/test/libcxx/compiler.py
+++ b/libcxx/test/libcxx/compiler.py
@@ -38,13 +38,15 @@ class CXXCompiler(object):
self.type = compiler_type
self.version = (major_ver, minor_ver, patchlevel)
- def _basicCmd(self, source_files, out, is_link=False):
+ def _basicCmd(self, source_files, out, is_link=False, input_is_cxx=False):
cmd = []
if self.use_ccache and not is_link:
cmd += ['ccache']
cmd += [self.path]
if out is not None:
cmd += ['-o', out]
+ if input_is_cxx:
+ cmd += ['-x', 'c++']
if isinstance(source_files, list):
cmd += source_files
elif isinstance(source_files, str):
@@ -54,12 +56,12 @@ class CXXCompiler(object):
return cmd
def preprocessCmd(self, source_files, out=None, flags=[]):
- cmd = self._basicCmd(source_files, out) + ['-x', 'c++', '-E']
+ cmd = self._basicCmd(source_files, out, input_is_cxx=True) + ['-E']
cmd += self.flags + self.compile_flags + flags
return cmd
def compileCmd(self, source_files, out=None, flags=[]):
- cmd = self._basicCmd(source_files, out) + ['-x', 'c++', '-c']
+ cmd = self._basicCmd(source_files, out, input_is_cxx=True) + ['-c']
cmd += self.flags + self.compile_flags + flags
return cmd
@@ -69,7 +71,7 @@ class CXXCompiler(object):
return cmd
def compileLinkCmd(self, source_files, out=None, flags=[]):
- cmd = self._basicCmd(source_files, out, is_link=True) + ['-x', 'c++']
+ cmd = self._basicCmd(source_files, out, is_link=True)
cmd += self.flags + self.compile_flags + self.link_flags + flags
return cmd
OpenPOWER on IntegriCloud