Download patches/llvm_windows_mingw_compat.patch from SaylorTwift/codex: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/SaylorTwift/codex/resolve/main/patches/llvm_windows_mingw_compat.patch
- Command line
-
hf download hf://SaylorTwift/codex/patches/llvm_windows_mingw_compat.patch
-
curl -L -o llvm_windows_mingw_compat.patch https://huggingface.co/SaylorTwift/codex/resolve/main/patches/llvm_windows_mingw_compat.patch
1.35 kB
| # What: provide MinGW compatibility archives required by Windows gnullvm links. | |
| # Why: clang and prebuilt MSVC archives can request these names even though the | |
| # hermetic MinGW runtime does not publish them by default. | |
| diff --git a/runtimes/mingw/BUILD.bazel b/runtimes/mingw/BUILD.bazel | |
| --- a/runtimes/mingw/BUILD.bazel | |
| +++ b/runtimes/mingw/BUILD.bazel | |
| stub_library( | |
| name = "stdc++", | |
| ) | |
| +# Clang may inject -lssp and -lssp_nonshared for windows-gnu links. | |
| +# Provide compatibility archives in the MinGW runtime search directory. | |
| +stub_library( | |
| + name = "ssp", | |
| +) | |
| + | |
| +stub_library( | |
| + name = "ssp_nonshared", | |
| +) | |
| + | |
| +# Prebuilt MSVC archives can carry /DEFAULTLIB:libcmt.lib and | |
| +# /DEFAULTLIB:oldnames.lib directives. Provide MinGW-compatible stand-ins so | |
| +# lld can satisfy the lookup under windows-gnullvm. | |
| +stub_library( | |
| + name = "libcmt", | |
| +) | |
| + | |
| +copy_file( | |
| + name = "oldnames", | |
| + src = ":moldname", | |
| + out = "liboldnames.a", | |
| + visibility = ["//visibility:public"], | |
| +) | |
| + | |
| copy_to_directory( | |
| name = "mingw_crt_library_search_directory", | |
| srcs = [ | |
| + ":libcmt", | |
| ":m", | |
| ":mingw32", | |
| ":mingwex", | |
| ":moldname", | |
| + ":oldnames", | |
| ":pthread", | |
| + ":ssp", | |
| + ":ssp_nonshared", | |
| ":stdc++", | |
| ":uuid", | |
| ":winpthread", | |