Ticket #44367: arb-PATCH-arb_compiler_version.pl.diff
File arb-PATCH-arb_compiler_version.pl.diff, 827 bytes (added by mattcottrell, 10 years ago) |
---|
-
SOURCE_TOOLS/arb_compiler_version.pl
38 38 if ($detectedCompiler eq 'unknown') { 39 39 if ($detailedVersion =~ /apple.*llvm.*clang/oi) { $detectedCompiler = 'clang'; } 40 else { 41 # check for clang according to #582 42 my $cmd = "$compiler -dM -E -x c /dev/null"; 43 if (open(CMD,$cmd.'|')) { 44 LINE: foreach (<CMD>) { 45 if (/__clang__/) { 46 $detectedCompiler = 'clang'; 47 last LINE; 48 } 49 } 50 close(CMD); 51 } 52 else { 53 print STDERR "failed to execute '$cmd'"; 54 } 55 } 40 56 } 41 57