Commit bc94f85
committed
meson(cargo): support Windows again
For over a year, Git has been moved to a more modern build system than
it had before (GNU make, or on Windows optionally CMake). Naturally,
this new system breaks Windows support left and right.
For example, c184795 (meson: add infrastructure to build internal
Rust library, 2025-10-02) added support for building a Rust library, and
it fails when Visual C is configured as compiler.
This is the reason that the `win+Meson` job of Git's `master` branch
fails for the past 16 days, i.e. the latest 9 pushes of the `master`
branch as of time of writing. The symptom is:
[697/905] Generating src/git_rs with a custom command
FAILED: [code=1] src/libgitcore.a "C:\Program Files\Git\bin\sh.exe" "D:/a/git/git/src/cargo-meson.sh" "D:/a/git/git" "D:/a/git/git/build/src" "--release"
cp: cannot stat 'D:/a/git/git/build/src/release/libgitcore.a': No such file or directory
The reason is that Visual C's output is called `gitcore.lib`, not
`libgitcore.a`. Let's special-case Visual C and use the correct filename
in all cases.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent c54a18e commit bc94f85
2 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
30 | 33 | | |
31 | | - | |
| 34 | + | |
32 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
| |||
21 | 29 | | |
22 | 30 | | |
23 | 31 | | |
24 | | - | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
| |||
0 commit comments