[Lldb-commits] [lldb] r230493 - Remove use_pthread option from getBuildFlags in the test environment

Tamas Berghammer tberghammer at google.com
Wed Feb 25 05:26:28 PST 2015


Author: tberghammer
Date: Wed Feb 25 07:26:28 2015
New Revision: 230493

URL: http://llvm.org/viewvc/llvm-project?rev=230493&view=rev
Log:
Remove use_pthread option from getBuildFlags in the test environment

Removing the option to require the usage of pthread based on an argument
of the getBuildFlags method in lldbtest.py because it can be specified
by a variable in the makefile for the given test case. Using the
variable in the makefile works in all supported platforms.

Differential revision: http://reviews.llvm.org/D7861

Modified:
    lldb/trunk/test/functionalities/thread/create_after_attach/Makefile
    lldb/trunk/test/functionalities/thread/exit_during_step/Makefile
    lldb/trunk/test/functionalities/thread/jump/Makefile
    lldb/trunk/test/functionalities/thread/thread_exit/Makefile
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/test/functionalities/thread/create_after_attach/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/create_after_attach/Makefile?rev=230493&r1=230492&r2=230493&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/create_after_attach/Makefile (original)
+++ lldb/trunk/test/functionalities/thread/create_after_attach/Makefile Wed Feb 25 07:26:28 2015
@@ -1,4 +1,5 @@
 LEVEL = ../../../make
 
+ENABLE_THREADS := YES
 C_SOURCES := main.c
 include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/thread/exit_during_step/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/exit_during_step/Makefile?rev=230493&r1=230492&r2=230493&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/exit_during_step/Makefile (original)
+++ lldb/trunk/test/functionalities/thread/exit_during_step/Makefile Wed Feb 25 07:26:28 2015
@@ -1,4 +1,5 @@
 LEVEL = ../../../make
 
+ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/thread/jump/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/jump/Makefile?rev=230493&r1=230492&r2=230493&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/jump/Makefile (original)
+++ lldb/trunk/test/functionalities/thread/jump/Makefile Wed Feb 25 07:26:28 2015
@@ -1,4 +1,5 @@
 LEVEL = ../../../make
 
+ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp other.cpp
 include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/functionalities/thread/thread_exit/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/thread/thread_exit/Makefile?rev=230493&r1=230492&r2=230493&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/thread/thread_exit/Makefile (original)
+++ lldb/trunk/test/functionalities/thread/thread_exit/Makefile Wed Feb 25 07:26:28 2015
@@ -1,4 +1,5 @@
 LEVEL = ../../../make
 
+ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 include $(LEVEL)/Makefile.rules

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=230493&r1=230492&r2=230493&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Feb 25 07:26:28 2015
@@ -1525,11 +1525,12 @@ class Base(unittest2.TestCase):
         
         return os.environ["CC"]
 
-    def getBuildFlags(self, use_cpp11=True, use_libcxx=False, use_libstdcxx=False, use_pthreads=True):
+    def getBuildFlags(self, use_cpp11=True, use_libcxx=False, use_libstdcxx=False):
         """ Returns a dictionary (which can be provided to build* functions above) which
             contains OS-specific build flags.
         """
         cflags = ""
+        ldflags = ""
 
         # On Mac OS X, unless specifically requested to use libstdc++, use libc++
         if not use_libstdcxx and sys.platform.startswith('darwin'):
@@ -1554,9 +1555,6 @@ class Base(unittest2.TestCase):
         elif "clang" in self.getCompiler():
             cflags += " -stdlib=libstdc++"
 
-        if use_pthreads:
-            ldflags = "-lpthread"
-
         return {'CFLAGS_EXTRAS' : cflags,
                 'LD_EXTRAS' : ldflags,
                }





More information about the lldb-commits mailing list