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 | c5df02fa0d9879041a41b0f56573c61ee651febd (patch) | |
| tree | c57be2f42911242ec9ec35db5ee4c9177ad0a0d9 /openmp | |
| parent | b98a2bb7a86196dda52353e690ec08a84c1a202b (diff) | |
| download | bcm5719-llvm-c5df02fa0d9879041a41b0f56573c61ee651febd.tar.gz bcm5719-llvm-c5df02fa0d9879041a41b0f56573c61ee651febd.zip | |
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.
llvm-svn: 202029
Diffstat (limited to 'openmp')
| -rwxr-xr-x | openmp/runtime/tools/check-tools.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openmp/runtime/tools/check-tools.pl b/openmp/runtime/tools/check-tools.pl index c58817d61a6..f36d51a1f5b 100755 --- a/openmp/runtime/tools/check-tools.pl +++ b/openmp/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 ) ) { |

