Skip to content

Commit 7149675

Browse files
committed
make sure llvm toolchain still works on windows
1 parent 2ce4932 commit 7149675

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

graalpython/lib-graalpython/_sysconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _get_posix_vars():
100100
g['LDSHARED'] = get_toolchain('CC') + " -bundle -undefined dynamic_lookup"
101101
g['LDFLAGS'] = "-bundle -undefined dynamic_lookup"
102102
elif win32_native:
103-
g['LDFLAGS'] = f"-L{__graalpython__.capi_home.replace(os.path.sep, '/')} -llibpython.{so_abi}"
103+
g['LDFLAGS'] = f"-L{__graalpython__.capi_home.replace(os.path.sep, '/')}"
104104
g['LDSHARED_WINDOWS'] = f"{g['LDSHARED_LINUX']} {g['LDFLAGS']}"
105105
g['LDSHARED'] = g['LDSHARED_WINDOWS']
106106
else:

graalpython/lib-python/3/distutils/ccompiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ def mkpath (self, name, mode=0o777):
930930

931931
# OS name mappings
932932
('posix', 'unix'),
933-
('nt', 'msvc'),
933+
('nt', 'msvc') if __graalpython__.use_system_toolchain else ('nt', 'unix'),
934934
)
935935

936936
def get_default_compiler(osname=None, platform=None):

graalpython/lib-python/3/distutils/command/build_ext.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,9 @@ def get_libraries(self, ext):
720720
template = template + '_d'
721721
pythonlib = (template %
722722
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
723+
# Begin Truffle change
724+
pythonlib = f"python-{__graalpython__.platform_id}"
725+
# End Truffle change
723726
# don't extend ext.libraries, it may be shared with other
724727
# extensions, it is a reference to the original list
725728
return ext.libraries + [pythonlib]

0 commit comments

Comments
 (0)