generate .lib for .pyd files on Windows.

This commit is contained in:
rdb 2014-02-20 20:00:45 +00:00
parent 60fb5376f9
commit 260cb66c54

View File

@ -1354,12 +1354,12 @@ def CompileLink(dll, obj, opts):
cmd += ' /OUT:' + BracketNameWithQuotes(dll)
subsystem = GetValueOption(opts, "SUBSYSTEM:")
if (subsystem): cmd += " /SUBSYSTEM:" + subsystem
if (dll.endswith(".dll")):
cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/'+os.path.splitext(os.path.basename(dll))[0]+".lib"
if (dll.endswith(".dll") or dll.endswith(".pyd")):
cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(dll))[0] + ".lib"
for (opt, dir) in LIBDIRECTORIES:
if (opt=="ALWAYS") or (opt in opts): cmd += ' /LIBPATH:' + BracketNameWithQuotes(dir)
for x in obj:
if (x.endswith(".dll")):
if (x.endswith(".dll") or x.endswith(".pyd")):
cmd += ' ' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(x))[0] + ".lib"
elif (x.endswith(".lib")):
dname = os.path.splitext(os.path.basename(x))[0] + ".dll"
@ -1401,12 +1401,12 @@ def CompileLink(dll, obj, opts):
cmd += ' /OUT:' + BracketNameWithQuotes(dll)
subsystem = GetValueOption(opts, "SUBSYSTEM:")
if (subsystem): cmd += " /SUBSYSTEM:" + subsystem
if (dll.endswith(".dll")):
if (dll.endswith(".dll") or dll.endswith(".pyd")):
cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/'+os.path.splitext(os.path.basename(dll))[0]+".lib"
for (opt, dir) in LIBDIRECTORIES:
if (opt=="ALWAYS") or (opt in opts): cmd += ' /LIBPATH:' + BracketNameWithQuotes(dir)
for x in obj:
if (x.endswith(".dll")):
if (x.endswith(".dll") or x.endswith(".pyd")):
cmd += ' ' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(x))[0] + ".lib"
elif (x.endswith(".lib")):
dname = os.path.splitext(dll)[0]+".dll"