Skip to content

Commit

Permalink
Bug 1177759 - make clang version detection robust for higher versions…
Browse files Browse the repository at this point in the history
…, r=ttaubert

Differential Revision: https://nss-review.dev.mozaws.net/D171

--HG--
extra : rebase_source : 94dce64fd68dd7ad91634a97f3f8b1512e52a832
extra : amend_source : 1d8eecd185c6721a7f16c57a0cd09c8375de31ed
  • Loading branch information
franziskuskiefer committed Jan 24, 2017
1 parent fb339be commit 620ea1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coreconf/sanitizers.sh
Expand Up @@ -21,8 +21,8 @@ enable_sanitizer()

enable_sancov()
{
local clang_version=$($CC --version | grep -oE 'clang version (3\.9\.|4\.)')
if [ -z "$clang_version" ]; then
local clang_version=$($CC --version | grep -oE '([0-9]{1,}\.)+[0-9]{1,}')
if [[ ${clang_version:0:1} -lt 4 && ${clang_version:0:1} -eq 3 && ${clang_version:2:1} -lt 9 ]]; then
echo "Need at least clang-3.9 (better 4.0) for sancov." 1>&2
exit 1
fi
Expand Down

0 comments on commit 620ea1e

Please sign in to comment.