Hi zturner,
lld on Windows doesn't yet support -L, furthermore, the import library is in
the lib directory rather than the bin directory.
This fix allows several more of the test programs to compile and link
successfully.
http://reviews.llvm.org/D8494
Files:
test/lldbtest.py
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\..\lib -L%s -lliblldb" % self.lib_dir}
if self.TraceOn():
print "Building LLDB Driver (%s) from sources %s" % (exe_name,
sources)
@@ -1509,11 +1514,17 @@
'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\..\lib\liblldb.lib" %
self.lib_dir}
+
if self.TraceOn():
print "Building LLDB Library (%s) from sources %s" % (lib_name,
sources)
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
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\..\lib -L%s -lliblldb" % self.lib_dir}
if self.TraceOn():
print "Building LLDB Driver (%s) from sources %s" % (exe_name, sources)
@@ -1509,11 +1514,17 @@
'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\..\lib\liblldb.lib" % self.lib_dir}
+
if self.TraceOn():
print "Building LLDB Library (%s) from sources %s" % (lib_name, sources)
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits