changeset 35668:67cead0eb671

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
author Augie Fackler <augie@google.com>
date Wed, 17 Jan 2018 15:28:38 -0500
parents de598e84c244
children 39499bc31fcd
files tests/hghave.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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