Commit 02e4656
mingw: rely on MSYS2's metadata instead of hard-coding it
MSYS2 defines some helpful environment variables, e.g. `MSYSTEM`. There
is code in Git for Windows to ensure that that `MSYSTEM` variable is
set, hard-coding a default.
However, the existing solution jumps through hoops to reconstruct the
proper default, and is even incomplete doing so, as we found out when we
extended it to support CLANGARM64.
This is absolutely unnecessary because there is already a perfectly
valid `MSYSTEM` value we can use at build time. This is even true when
building the MINGW32 variant on a MINGW64 system because `makepkg-mingw`
will override the `MSYSTEM` value as per the `MINGW_ARCH` array.
The same is equally true for the `/mingw64`, `/mingw32` and
`/clangarm64` prefix: those values are already available via the
`MINGW_PREFIX` environment variable, and we just need to pass that
setting through.
Only when `MINGW_PREFIX` is not set (as is the case in Git for Windows'
minimal SDK, where only `MSYSTEM` is guaranteed to be set correctly), we
use as fall-back the top-level directory whose name is the down-cased
value of the `MSYSTEM` variable.
Incidentally, this also broadens the support to all the configurations
supported by the MSYS2 project, i.e. clang64 & ucrt64, too.
Note: This keeps the same, hard-coded MSYSTEM platform support for CMake
as before, but drops it for Meson (because it is unclear how Meson could
do this in a more flexible manner).
Signed-off-by: Johannes Schindelin <[email protected]>1 parent 8442555 commit 02e4656
File tree
5 files changed
+43
-34
lines changed- compat
- contrib/buildsystems
5 files changed
+43
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3625 | 3625 | | |
3626 | 3626 | | |
3627 | 3627 | | |
3628 | | - | |
| 3628 | + | |
3629 | 3629 | | |
3630 | 3630 | | |
3631 | 3631 | | |
| |||
3643 | 3643 | | |
3644 | 3644 | | |
3645 | 3645 | | |
3646 | | - | |
3647 | | - | |
3648 | | - | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
3649 | 3649 | | |
3650 | | - | |
3651 | | - | |
3652 | | - | |
3653 | | - | |
3654 | | - | |
3655 | | - | |
3656 | | - | |
3657 | | - | |
3658 | | - | |
| 3650 | + | |
3659 | 3651 | | |
3660 | 3652 | | |
3661 | 3653 | | |
3662 | 3654 | | |
3663 | | - | |
3664 | | - | |
| 3655 | + | |
3665 | 3656 | | |
3666 | 3657 | | |
3667 | 3658 | | |
| |||
3757 | 3748 | | |
3758 | 3749 | | |
3759 | 3750 | | |
3760 | | - | |
3761 | | - | |
3762 | | - | |
3763 | | - | |
3764 | | - | |
3765 | | - | |
3766 | | - | |
| 3751 | + | |
3767 | 3752 | | |
3768 | 3753 | | |
3769 | 3754 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 455 | + | |
| 456 | + | |
463 | 457 | | |
464 | 458 | | |
465 | 459 | | |
| |||
529 | 523 | | |
530 | 524 | | |
531 | 525 | | |
532 | | - | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
533 | 529 | | |
534 | 530 | | |
535 | 531 | | |
| |||
748 | 744 | | |
749 | 745 | | |
750 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
755 | 757 | | |
756 | 758 | | |
757 | 759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
286 | 293 | | |
287 | 294 | | |
288 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1271 | 1271 | | |
1272 | 1272 | | |
1273 | 1273 | | |
1274 | | - | |
1275 | 1274 | | |
1276 | 1275 | | |
1277 | 1276 | | |
| |||
1281 | 1280 | | |
1282 | 1281 | | |
1283 | 1282 | | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1284 | 1295 | | |
1285 | 1296 | | |
1286 | 1297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
0 commit comments