Skip to content

Commit 84f2d69

Browse files
committed
Fix windows build
1 parent 2fa1141 commit 84f2d69

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

build.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
if "LD" not in os.environ:
103103
os.environ["LD"] = "lld-link"
104104

105+
# Fix for clang-cl compilation issues with cc crate
106+
# Force cc crate to not use flag with multiple source files
107+
os.environ["CC_ENABLE_DEBUG_OUTPUT"] = "1"
108+
105109
RUST_LIB_PFX = ""
106110
RUST_STATIC_LIB_EXT = "lib"
107111
RUST_DYLIB_EXT = "dll"
@@ -228,27 +232,27 @@ def _build_extensions() -> list[Extension]:
228232

229233
if IS_WINDOWS:
230234
extra_link_args += [
231-
"AdvAPI32.Lib",
235+
"advapi32.lib",
232236
"bcrypt.lib",
233-
"Crypt32.lib",
234-
"Iphlpapi.lib",
235-
"Kernel32.lib",
237+
"crypt32.lib",
238+
"iphlpapi.lib",
239+
"kernel32.lib",
236240
"ncrypt.lib",
237-
"Netapi32.lib",
241+
"netapi32.lib",
238242
"ntdll.lib",
239-
"Ole32.lib",
240-
"OleAut32.lib",
241-
"Pdh.lib",
242-
"PowrProf.lib",
243-
"Propsys.lib",
244-
"Psapi.lib",
243+
"ole32.lib",
244+
"oleaut32.lib",
245+
"pdh.lib",
246+
"powrprof.lib",
247+
"propsys.lib",
248+
"psapi.lib",
245249
"runtimeobject.lib",
246250
"schannel.lib",
247251
"secur32.lib",
248-
"Shell32.lib",
249-
"User32.Lib",
250-
"UserEnv.Lib",
251-
"WS2_32.Lib",
252+
"shell32.lib",
253+
"user32.lib",
254+
"userenv.lib",
255+
"ws2_32.lib",
252256
]
253257

254258
print("Creating C extension modules...")

0 commit comments

Comments
 (0)