Use lib instead of dlltool for msvc build
@@ -318,6 +318,16 @@ class build_ext(_build_ext):
"""
for sim in ["icarus", "modelsim", "aldec", "ghdl"]:
+ if self._uses_msvc():
+ subprocess.run(
+ [
+ self.compiler.lib,
+ "/def:" + os.path.join(def_dir, sim + ".def"),
+ "/out:" + os.path.join(def_dir, sim + ".lib"),
+ "/machine:" + ("X64" if sys.maxsize > 2**32 else "X86")
+ ]
+ )
+ else:
subprocess.run(
[
"dlltool",
