diff options
author | Alp Toker <alp@nuanti.com> | 2014-02-24 12:29:09 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-02-24 12:29:09 +0000 |
commit | 724ef6a592261750079e17c369c6039211ec646b (patch) | |
tree | 06149962277db18791ee1a14ef66823e3c0ca02b /runtime/tools | |
parent | c3b8311f916acba81315bbdf1d741cdf0438128f (diff) |
Fix clang compiler detection on OS X
check-tools.pl was hard-wired to expect the Apple compiler version string which
doesn't make much sense, especially for a LLVM project.
The correctness and value of these compiler version checks still isn't clear
following this build fix but they are retained for now.
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@202029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/tools')
-rwxr-xr-x | runtime/tools/check-tools.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/tools/check-tools.pl b/runtime/tools/check-tools.pl index c58817d..f36d51a 100755 --- a/runtime/tools/check-tools.pl +++ b/runtime/tools/check-tools.pl @@ -296,15 +296,14 @@ sub get_clang_compiler_version($) { $rc = run( [ $tool, "--version" ], $stdout, $stderr ); if ( $rc >= 0 ) { my ( $ver, $bld ); - if ( $target_os eq "mac" ) { + if ( $target_os eq "mac" and $stdout =~ m{^.*? (\d+\.\d+) \(.*-(\d+\.\d+\.\d+)\)}m ) { # Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) - $stdout =~ m{^.*? (\d+\.\d+) \(.*-(\d+\.\d+\.\d+)\)}m; ( $ver, $bld ) = ( $1, $2 ); } else { if ( 0 ) { - } elsif ( $stdout =~ m{^.*? (\d+\.\d+) \((.*)\)}m ) { + } elsif ( $stdout =~ m{^.*? (\d+\.\d+)( \((.*)\))?}m ) { # clang version 3.3 (tags/RELEASE_33/final) - ( $ver, $bld ) = ( $1, $2 ); + ( $ver, $bld ) = ( $1, $3 ); } }; # if if ( defined( $ver ) ) { |