Skip to content

Commit 27e7805

Browse files
committed
distutils: Discard cffi's libffi on MSVC
cffi includes a near replica of the CPython 3.7's libffi on MSVC, which needs to be discard to avoid duplicate syms.
1 parent e0b31b3 commit 27e7805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyoxidizer/src/distutils/_msvccompiler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,11 @@ def extension_link_shared_object(self,
586586
# directory that doesn't outlive this process.
587587
object_paths = []
588588
for i, o in enumerate(objects):
589+
if 'libffi_msvc' in o:
590+
print('Ignored static {}'.format(o))
591+
# https://github.com/indygreg/python-build-standalone/issues/23
592+
# cffi includes a near replica of CPython's custom libffi.
593+
continue
589594
p = os.path.join(dest_path, '%s.%d.o' % (name, i))
590595
shutil.copyfile(o, p)
591596
object_paths.append(p)

0 commit comments

Comments
 (0)