diff options
| author | ruki <[email protected]> | 2024-12-01 13:13:04 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-01 13:13:04 +0800 |
| commit | ee024dc442379d5fae95ea7a0ff0ce0c0331ee97 (patch) | |
| tree | c413c47eef9c775ccbdd0d679d1e70a0a5bd98f4 | |
| parent | 50f38ee9620dd4ca794eab340e6997f22518ef55 (diff) | |
| parent | 04304b3e063b65d1e3e0ac3f40aa99d36f06e4a3 (diff) | |
Merge pull request #5909 from ifarbod/patch-1
Obtain MinGW's path from LLVM_MINGW_DIR/ROOT
| -rw-r--r-- | xmake/modules/detect/sdks/find_mingw.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 4085a6cb8..ac1f9802a 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -41,8 +41,8 @@ function _find_mingwdir(sdkdir) sdkdir = "/opt/homebrew/opt/mingw-w64" elseif is_host("linux") then sdkdir = "/usr" - elseif is_subhost("msys") then - local mingw_prefix = os.getenv("MINGW_PREFIX") + else + local mingw_prefix = is_subhost("msys") and os.getenv("MINGW_PREFIX") or os.getenv("LLVM_MINGW_DIR") or os.getenv("LLVM_MINGW_ROOT") if mingw_prefix and os.isdir(mingw_prefix) then sdkdir = mingw_prefix end |
