Skip to content

Commit 5e65926

Browse files
committed
TO-DROP: install libuserenv.a
When linking any Rust-generated library, GCC would complain about: undefined reference to `GetUserProfileDirectoryW' Apparently there is _some_ closure that gets compiled in that requires this function, and that in turn forces Git to link to libuserenv. This is a new requirement, and therefore has not been made part of the "minimal Git for Windows SDK". In the near future, I intend to include it, but for now let's just ensure that the file is added manually if it is missing. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9c3b017 commit 5e65926

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,14 @@ jobs:
115115
steps:
116116
- uses: actions/checkout@v4
117117
- uses: git-for-windows/setup-git-for-windows-sdk@v1
118+
- name: ensure that libuserenv.a is present
119+
shell: bash
120+
run: |
121+
cd /mingw64/lib && {
122+
test -f libuserenv.a ||
123+
/c/Program\ Files/Git/mingw64/bin/curl -Lo libuserenv.a \
124+
https://github.com/git-for-windows/git-sdk-64/raw/HEAD/mingw64/lib/libuserenv.a
125+
}
118126
- name: build
119127
shell: bash
120128
env:

0 commit comments

Comments
 (0)