[Lldb-commits] [lldb] r369477 - [dotest] Don't set the DWARF version override in CFLAGS_EXTRA.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 20 16:56:33 PDT 2019


Author: jdevlieghere
Date: Tue Aug 20 16:56:32 2019
New Revision: 369477

URL: http://llvm.org/viewvc/llvm-project?rev=369477&view=rev
Log:
[dotest] Don't set the DWARF version override in CFLAGS_EXTRA.

We cannot override the DWARF version in the CFLAGS_EXTRA because they
are used by tests that explicitly build without debug info. Instead, we
pass them through the regular CFLAGS.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/dotest.py
    lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/dotest.py?rev=369477&r1=369476&r2=369477&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/dotest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/dotest.py Tue Aug 20 16:56:32 2019
@@ -342,15 +342,14 @@ def parseOptionsAndInitTestdirs():
         configuration.skipCategories += test_categories.validate(
             args.skipCategories, False)
 
-    cflags_extras = ""
     if args.E:
-        cflags_extras += args.E
+        os.environ['CFLAGS_EXTRAS'] = args.E
 
     if args.dwarf_version:
         configuration.dwarf_version = args.dwarf_version
-        cflags_extras += '-gdwarf-{}'.format(args.dwarf_version)
-
-    os.environ['CFLAGS_EXTRAS'] = cflags_extras
+        # We cannot modify CFLAGS_EXTRAS because they're used in test cases
+        # that explicitly require no debug info.
+        os.environ['CFLAGS'] = '-gdwarf-{}'.format(configuration.dwarf_version)
 
     if args.d:
         sys.stdout.write(

Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py?rev=369477&r1=369476&r2=369477&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py Tue Aug 20 16:56:32 2019
@@ -116,7 +116,7 @@ def getCmdLine(d):
     pattern = '%s="%s"' if "win32" in sys.platform else "%s='%s'"
 
     def setOrAppendVariable(k, v):
-        append_vars = ["CFLAGS_EXTRAS", "LD_EXTRAS"]
+        append_vars = ["CFLAGS", "CFLAGS_EXTRAS", "LD_EXTRAS"]
         if k in append_vars and k in os.environ:
             v = os.environ[k] + " " + v
         return pattern % (k, v)




More information about the lldb-commits mailing list