hghave: add test for clang 6 and later
clang 6 includes integrated libfuzzer support, which makes fuzzer
stuff a little easier to work with.
Differential Revision: https://phab.mercurial-scm.org/D1873
--- a/tests/hghave.py Sun Jan 14 12:06:27 2018 -0800
+++ b/tests/hghave.py Wed Jan 17 15:28:38 2018 -0500
@@ -700,3 +700,11 @@
return True
except ImportError:
return False
+
+@check("clang-libfuzzer", "clang new enough to include libfuzzer")
+def has_clang_libfuzzer():
+ mat = matchoutput('clang --version', 'clang version (\d)')
+ if mat:
+ # libfuzzer is new in clang 6
+ return int(mat.group(1)) > 5
+ return False