[LNT] r263186 - When no cflags are passed on the command line, don't override them

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 18:15:11 PST 2016


Author: cmatthews
Date: Thu Mar 10 20:15:11 2016
New Revision: 263186

URL: http://llvm.org/viewvc/llvm-project?rev=263186&view=rev
Log:
When no cflags are passed on the command line, don't override them

These were set to blank if not set. For caches to override them they
need to be fully not set.

Modified:
    lnt/trunk/lnt/tests/test_suite.py

Modified: lnt/trunk/lnt/tests/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/test_suite.py?rev=263186&r1=263185&r2=263186&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Thu Mar 10 20:15:11 2016
@@ -348,11 +348,15 @@ class TestSuiteTest(BuiltinTest):
             # FIXME: Support ARCH, SMALL/LARGE etc
             'CMAKE_C_COMPILER': self.opts.cc,
             'CMAKE_CXX_COMPILER': self.opts.cxx,
-            'CMAKE_C_FLAGS': self._unix_quote_args(' '.join([self.opts.cppflags,
-                                                             self.opts.cflags])),
-            'CMAKE_CXX_FLAGS': self._unix_quote_args(' '.join([self.opts.cppflags,
-                                                               self.opts.cxxflags]))
         }
+        if self.opts.cppflags or self.opts.cflags:
+            all_cflags = ' '.join([self.opts.cppflags, self.opts.cflags])
+            defs['CMAKE_C_FLAGS'] = self._unix_quote_args(all_cflags)
+        
+        if self.opts.cppflags or self.opts.cxxflags:
+            all_cxx_flags = ' '.join([self.opts.cppflags, self.opts.cxxflags])
+            defs['CMAKE_CXX_FLAGS'] = self._unix_quote_args(all_cxx_flags)
+        
         if self.opts.run_under:
             defs['TEST_SUITE_RUN_UNDER'] = self._unix_quote_args(self.opts.run_under)
         if self.opts.benchmarking_only:




More information about the llvm-commits mailing list