Index: test/api/check_public_api_headers/TestPublicAPIHeaders.py =================================================================== --- test/api/check_public_api_headers/TestPublicAPIHeaders.py +++ test/api/check_public_api_headers/TestPublicAPIHeaders.py @@ -15,6 +15,7 @@ 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' Index: test/api/multiple-debuggers/TestMultipleDebuggers.py =================================================================== --- test/api/multiple-debuggers/TestMultipleDebuggers.py +++ test/api/multiple-debuggers/TestMultipleDebuggers.py @@ -14,6 +14,7 @@ def setUp(self): TestBase.setUp(self) self.lib_dir = os.environ["LLDB_LIB_DIR"] + self.implib_dir = os.environ["LLDB_IMPLIB_DIR"] @skipIfi386 @skipIfNoSBHeaders Index: test/api/multithreaded/TestMultithreaded.py =================================================================== --- test/api/multithreaded/TestMultithreaded.py +++ test/api/multithreaded/TestMultithreaded.py @@ -13,6 +13,7 @@ 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) Index: test/dotest.py =================================================================== --- test/dotest.py +++ test/dotest.py @@ -1019,9 +1019,13 @@ 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: Index: test/functionalities/plugins/commands/TestPluginCommands.py =================================================================== --- test/functionalities/plugins/commands/TestPluginCommands.py +++ test/functionalities/plugins/commands/TestPluginCommands.py @@ -17,6 +17,7 @@ # 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. Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -1487,10 +1487,15 @@ '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) @@ -1509,11 +1514,16 @@ '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)