Skip to content

Commit

Permalink
Issue rust-lang#6419: Better clang version detection for Apple Clang
Browse files Browse the repository at this point in the history
Apple Clang uses different version numbering than "regular" clang, but
it also provides the "regular" version it's based on. Update the sed
pattern to pull out this "regular" version number instead of the Apple
version number.
  • Loading branch information
lilyball committed May 25, 2013
1 parent 2706271 commit bf57d65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,11 @@ then
CFG_CLANG_VERSION=$("$CFG_CLANG" \
--version \
| grep version \
| sed 's/.*\(version .*\)/\1/' \
| sed 's/.*\(version .*\)/\1/; s/.*based on \(LLVM .*\))/\1/' \
| cut -d ' ' -f 2)

case $CFG_CLANG_VERSION in
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 4.0* | 4.1* | 4.2*)
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3*)
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
CFG_C_COMPILER="clang"
;;
Expand Down

1 comment on commit bf57d65

@catamorphism
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.