diff options
| author | iFarbod <[email protected]> | 2024-11-30 23:08:02 +0330 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-30 23:08:02 +0330 |
| commit | 04304b3e063b65d1e3e0ac3f40aa99d36f06e4a3 (patch) | |
| tree | 150f4d10fed4743f65b4e34bfd0f4b5f6793bcc8 | |
| parent | ce6f7dbd1350ba83c88c55b7ca170ae97bc54764 (diff) | |
Obtain MinGW's path from LLVM_MINGW_DIR/ROOT
If either of LLVM_MINGW_DIR or LLVM_MINGW_ROOT are present as environment variables, MinGW's path will be filled automatically by them.
| -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 |
