LLVM tools print installation path upon execution. If one uses LLVM tools bundled with Microsoft Visual Studio installation, they would be incorrectly detected as Microsoft's ones. Microsoft tools can have localized names, so a more specific string check is not feasible, but luckily we can test if "Microsoft" is at the beginning of the line, as it is always the case.
Unified · Split
| @@ -5127,9 +5127,9 @@ probe_cc(){ · 5126 unmodified lines | |||
| 5127 | _flags_filter=msvc_flags | 5127 | _flags_filter=msvc_flags |
| 5128 | _ld_lib='lib%.a' | 5128 | _ld_lib='lib%.a' |
| 5129 | _ld_path='-libpath:' | 5129 | _ld_path='-libpath:' |
| 5130 | elif $_cc -nologo- 2>&1 | grep -q Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then | 5130 | elif $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then |
| 5131 | _type=msvc | 5131 | _type=msvc |
| 5132 | if $_cc -nologo- 2>&1 | grep -q Microsoft; then | 5132 | if $_cc -nologo- 2>&1 | grep -q ^Microsoft; then |
| 5133 | _ident=$($_cc 2>&1 | head -n1 | tr -d '\r') | 5133 | _ident=$($_cc 2>&1 | head -n1 | tr -d '\r') |
| 5134 | else | 5134 | else |
| 5135 | _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r') | 5135 | _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r') |
| @@ -5239,7 +5239,7 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then · 103 unmodified lines | |||
| 5239 | DEPCCFLAGS=$_flags | 5239 | DEPCCFLAGS=$_flags |
| 5240 | fi | 5240 | fi |
| 5241 | 5241 | ||
| 5242 | if $ar 2>&1 | grep -q Microsoft; then | 5242 | if $ar 2>&1 | grep -q ^Microsoft; then |
| 5243 | arflags="-nologo" | 5243 | arflags="-nologo" |
| 5244 | ar_o='-out:$@' | 5244 | ar_o='-out:$@' |
| 5245 | elif $ar 2>&1 | grep -q "\[D\] "; then | 5245 | elif $ar 2>&1 | grep -q "\[D\] "; then |