[Lldb-commits] [lldb] r233416 - Fix lld command on Windows for many tests.
Adrian McCarthy
amccarth at google.com
Fri Mar 27 13:47:36 PDT 2015
Author: amccarth
Date: Fri Mar 27 15:47:35 2015
New Revision: 233416
URL: http://llvm.org/viewvc/llvm-project?rev=233416&view=rev
Log:
Fix lld command on Windows for many tests.
Modified:
lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
lldb/trunk/test/api/multithreaded/TestMultithreaded.py
lldb/trunk/test/dotest.py
lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py?rev=233416&r1=233415&r2=233416&view=diff
==============================================================================
--- lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py (original)
+++ lldb/trunk/test/api/check_public_api_headers/TestPublicAPIHeaders.py Fri Mar 27 15:47:35 2015
@@ -15,6 +15,7 @@ class SBDirCheckerCase(TestBase):
def setUp(self):
TestBase.setUp(self)
self.lib_dir = os.environ["LLDB_LIB_DIR"]
+ self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
self.template = 'main.cpp.template'
self.source = 'main.cpp'
self.exe_name = 'a.out'
Modified: lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py?rev=233416&r1=233415&r2=233416&view=diff
==============================================================================
--- lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py (original)
+++ lldb/trunk/test/api/multiple-debuggers/TestMultipleDebuggers.py Fri Mar 27 15:47:35 2015
@@ -14,6 +14,7 @@ class TestMultipleSimultaneousDebuggers(
def setUp(self):
TestBase.setUp(self)
self.lib_dir = os.environ["LLDB_LIB_DIR"]
+ self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
@skipIfi386
@skipIfNoSBHeaders
Modified: lldb/trunk/test/api/multithreaded/TestMultithreaded.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/api/multithreaded/TestMultithreaded.py?rev=233416&r1=233415&r2=233416&view=diff
==============================================================================
--- lldb/trunk/test/api/multithreaded/TestMultithreaded.py (original)
+++ lldb/trunk/test/api/multithreaded/TestMultithreaded.py Fri Mar 27 15:47:35 2015
@@ -13,6 +13,7 @@ class SBBreakpointCallbackCase(TestBase)
def setUp(self):
TestBase.setUp(self)
self.lib_dir = os.environ["LLDB_LIB_DIR"]
+ self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
self.inferior = 'inferior_program'
if self.getArchitecture() != "i386":
self.buildProgram('inferior.cpp', self.inferior)
Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=233416&r1=233415&r2=233416&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Fri Mar 27 15:47:35 2015
@@ -1008,9 +1008,13 @@ def setupSysPath():
if lldbHere:
os.environ["LLDB_HERE"] = lldbHere
- os.environ["LLDB_LIB_DIR"] = os.path.split(lldbHere)[0]
+ lldbLibDir = os.path.split(lldbHere)[0] # confusingly, this is the "bin" directory
+ os.environ["LLDB_LIB_DIR"] = lldbLibDir
+ lldbImpLibDir = os.path.join(lldbLibDir, '..', 'lib') if sys.platform.startswith('win32') else lldbLibDir
+ os.environ["LLDB_IMPLIB_DIR"] = lldbImpLibDir
if not noHeaders:
print "LLDB library dir:", os.environ["LLDB_LIB_DIR"]
+ print "LLDB import library dir:", os.environ["LLDB_IMPLIB_DIR"]
os.system('%s -v' % lldbHere)
if not lldbExec:
Modified: lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py?rev=233416&r1=233415&r2=233416&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py (original)
+++ lldb/trunk/test/functionalities/plugins/commands/TestPluginCommands.py Fri Mar 27 15:47:35 2015
@@ -18,6 +18,7 @@ class PluginCommandTestCase(TestBase):
# Call super's setUp().
TestBase.setUp(self)
self.lib_dir = os.environ["LLDB_LIB_DIR"]
+ self.implib_dir = os.environ["LLDB_IMPLIB_DIR"]
@expectedFailureFreeBSD('llvm.org/pr17430')
@skipIfi386 # This test links against liblldb.so. Thus, the test requires a 32-bit liblldb.so.
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=233416&r1=233415&r2=233416&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Mar 27 15:47:35 2015
@@ -1490,10 +1490,15 @@ class Base(unittest2.TestCase):
'LD_EXTRAS' : "%s -Wl,-rpath,%s" % (dsym, self.lib_dir),
}
elif sys.platform.startswith('freebsd') or sys.platform.startswith("linux") or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
- d = {'CXX_SOURCES' : sources,
+ d = {'CXX_SOURCES' : sources,
'EXE' : exe_name,
'CFLAGS_EXTRAS' : "%s %s -I%s" % (stdflag, stdlibflag, os.path.join(os.environ["LLDB_SRC"], "include")),
'LD_EXTRAS' : "-L%s -llldb" % self.lib_dir}
+ elif sys.platform.startswith('win'):
+ d = {'CXX_SOURCES' : sources,
+ 'EXE' : exe_name,
+ 'CFLAGS_EXTRAS' : "%s %s -I%s" % (stdflag, stdlibflag, os.path.join(os.environ["LLDB_SRC"], "include")),
+ 'LD_EXTRAS' : "-L%s -lliblldb" % self.implib_dir}
if self.TraceOn():
print "Building LLDB Driver (%s) from sources %s" % (exe_name, sources)
@@ -1512,11 +1517,16 @@ class Base(unittest2.TestCase):
'FRAMEWORK_INCLUDES' : "-F%s" % self.lib_dir,
'LD_EXTRAS' : "%s -Wl,-rpath,%s -dynamiclib" % (dsym, self.lib_dir),
}
- elif sys.platform.startswith('freebsd') or sys.platform.startswith("linux") or sys.platform.startswith("win") or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
+ elif sys.platform.startswith('freebsd') or sys.platform.startswith("linux") or os.environ.get('LLDB_BUILD_TYPE') == 'Makefile':
d = {'DYLIB_CXX_SOURCES' : sources,
'DYLIB_NAME' : lib_name,
'CFLAGS_EXTRAS' : "%s -I%s -fPIC" % (stdflag, os.path.join(os.environ["LLDB_SRC"], "include")),
'LD_EXTRAS' : "-shared -L%s -llldb" % self.lib_dir}
+ elif sys.platform.startswith("win"):
+ d = {'DYLIB_CXX_SOURCES' : sources,
+ 'DYLIB_NAME' : lib_name,
+ 'CFLAGS_EXTRAS' : "%s -I%s -fPIC" % (stdflag, os.path.join(os.environ["LLDB_SRC"], "include")),
+ 'LD_EXTRAS' : "-shared -l%s\liblldb.lib" % self.implib_dir}
if self.TraceOn():
print "Building LLDB Library (%s) from sources %s" % (lib_name, sources)
More information about the lldb-commits
mailing list