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

llvm-svn: 230493
This commit is contained in:
Tamas Berghammer 2015-02-25 13:26:28 +00:00
parent 14f4476a88
commit 765b5e5bfe
5 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,5 @@
LEVEL = ../../../make
ENABLE_THREADS := YES
C_SOURCES := main.c
include $(LEVEL)/Makefile.rules

View File

@ -1,4 +1,5 @@
LEVEL = ../../../make
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp
include $(LEVEL)/Makefile.rules

View File

@ -1,4 +1,5 @@
LEVEL = ../../../make
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp other.cpp
include $(LEVEL)/Makefile.rules

View File

@ -1,4 +1,5 @@
LEVEL = ../../../make
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp
include $(LEVEL)/Makefile.rules

View File

@ -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,
}