hghave: add test for clang 6 and later
authorAugie Fackler <augie@google.com>
Wed, 17 Jan 2018 15:28:38 -0500
changeset 35668 67cead0eb671
parent 35667 de598e84c244
child 35669 39499bc31fcd
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
tests/hghave.py
--- 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