third_party/waf: upgrade to waf 2.0.8
[samba.git] / third_party / waf / waflib / extras / clang_compilation_database.py
index 756180f8bb62bb448b1e1f841e01c748f23fdb68..4d9b5e275aedc6c46ba9df5d89a7f193c5ae0969 100644 (file)
@@ -1,7 +1,3 @@
-#! /usr/bin/env python
-# encoding: utf-8
-# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
-
 #!/usr/bin/env python
 # encoding: utf-8
 # Christoph Koke, 2013
@@ -23,11 +19,6 @@ from waflib import Logs, TaskGen, Task
 
 Task.Task.keep_last_cmd = True
 
-if sys.hexversion >= 0x3030000:
-       quote = shlex.quote
-else:
-       quote = pipes.quote
-
 @TaskGen.feature('c', 'cxx')
 @TaskGen.after_method('process_use')
 def collect_compilation_db_tasks(self):
@@ -60,10 +51,9 @@ def write_compilation_database(ctx):
                directory = getattr(task, 'cwd', ctx.variant_dir)
                f_node = task.inputs[0]
                filename = os.path.relpath(f_node.abspath(), directory)
-               cmd = " ".join(map(quote, cmd))
                entry = {
                        "directory": directory,
-                       "command": cmd,
+                       "arguments": cmd,
                        "file": filename,
                }
                clang_db[filename] = entry
@@ -93,4 +83,3 @@ for x in ('c', 'cxx'):
 
        setattr(t, 'old_runnable_status', getattr(t, 'runnable_status', None))
        setattr(t, 'runnable_status', runnable_status)
-