macOS configure correctly reports clang and version
This commit is contained in:
parent
ba8980f492
commit
8d9b83bd11
2 changed files with 10 additions and 0 deletions
1
configure
vendored
1
configure
vendored
|
@ -55,6 +55,7 @@ case $targetos in
|
||||||
Darwin)
|
Darwin)
|
||||||
confvars="$confvars OSX"
|
confvars="$confvars OSX"
|
||||||
tcc_usrinclude="`xcrun --show-sdk-path`/usr/include"
|
tcc_usrinclude="`xcrun --show-sdk-path`/usr/include"
|
||||||
|
cc="clang"
|
||||||
DLLSUF=".dylib"
|
DLLSUF=".dylib"
|
||||||
;;
|
;;
|
||||||
Windows_NT|MINGW*|MSYS*|CYGWIN*)
|
Windows_NT|MINGW*|MSYS*|CYGWIN*)
|
||||||
|
|
|
@ -66,12 +66,21 @@ int main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
#ifdef __clang__
|
||||||
|
case 'm':
|
||||||
|
printf("%d\n", __clang_minor__);
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
printf("%d\n", __clang_major__);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
case 'm':
|
case 'm':
|
||||||
printf("%d\n", __GNUC_MINOR__);
|
printf("%d\n", __GNUC_MINOR__);
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("%d\n", __GNUC__);
|
printf("%d\n", __GNUC__);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
#elif defined __TINYC__
|
#elif defined __TINYC__
|
||||||
case 'v':
|
case 'v':
|
||||||
puts("0");
|
puts("0");
|
||||||
|
|
Loading…
Add table
Reference in a new issue