[libcxx] r226615 - Only use -target flag when target_triple is manually specified

Eric Fiselier eric at efcs.ca
Tue Jan 20 14:37:25 PST 2015


Author: ericwf
Date: Tue Jan 20 16:37:25 2015
New Revision: 226615

URL: http://llvm.org/viewvc/llvm-project?rev=226615&view=rev
Log:
Only use -target flag when target_triple is manually specified

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=226615&r1=226614&r2=226615&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Tue Jan 20 16:37:25 2015
@@ -22,6 +22,7 @@ class Configuration(object):
         self.obj_root = None
         self.cxx_library_root = None
         self.env = {}
+        self.use_target = False
         self.use_system_cxx_lib = False
         self.use_clang_verify = False
         self.long_tests = None
@@ -278,8 +279,8 @@ class Configuration(object):
         gcc_toolchain = self.get_lit_conf('gcc_toolchain')
         if gcc_toolchain:
             self.cxx.flags += ['-gcc-toolchain', gcc_toolchain]
-
-        self.cxx.flags += ['-target', self.config.target_triple]
+        if self.use_target:
+            self.cxx.flags += ['-target', self.config.target_triple]
 
     def configure_compile_flags_header_includes(self):
         self.cxx.compile_flags += ['-I' + self.libcxx_src_root + '/test/support']
@@ -444,9 +445,10 @@ class Configuration(object):
     def configure_triple(self):
         # Get or infer the target triple.
         self.config.target_triple = self.get_lit_conf('target_triple')
+        self.use_target = bool(self.config.target_triple)
         # If no target triple was given, try to infer it from the compiler
         # under test.
-        if not self.config.target_triple:
+        if not self.use_target:
             target_triple = self.cxx.getTriple()
             # Drop sub-major version components from the triple, because the
             # current XFAIL handling expects exact matches for feature checks.





More information about the cfe-commits mailing list