|
This adds a single check (which is already enough to fail).
clang-tidy < 7 requires absolute paths in the
compile-commands.json, which isn't what will happen here. If you
want to run with a previous version (6 is latest, 7 expected in a
month), apply this patch (which will break normal ninja
compilation, thus not applying it properly, and I'm not sure
it's worth any time getting it work when the clang-tidy bug is
fixed imminently):
diff --git a/BuildTools/scons2ninja.py b/BuildTools/scons2ninja.py
index df4c6559d..13e78d650 100755
--- a/BuildTools/scons2ninja.py
+++ b/BuildTools/scons2ninja.py
@@ -168,8 +168,16 @@ class NinjaBuilder :
self.variables += str(name) + " = " + str(value) + "\n"
def build(self, target, rule, sources = None, **kwargs) :
+ if is_list(target):
+ target = [os.path.abspath(x) for x in target]
+ else:
+ target = os.path.abspath(target)
self._build += "build " + self.to_string(target) + ": " + rule
if sources :
+ if is_list(sources):
+ sources = [os.path.abspath(x) for x in sources]
+ elif isinstance(sources, basestring):
+ sources = os.path.abspath(sources)
self._build += " " + self.to_string(sources)
if 'deps' in kwargs and kwargs['deps'] :
self._build += " | " + self.to_string(kwargs["deps"])
Test-Information:
Running make clang-tidy spits out complaints about the code.
Change-Id: Ic9f43fd2e11ebd595b4b8a5cee8d290cd5349abf
|