mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 09:57:15 +01:00
Use task.get_cwd() in clang_compilation_database
This commit is contained in:
parent
11f449ee57
commit
b27afc7bbc
@ -25,7 +25,6 @@ Usage:
|
|||||||
conf.load('clang_compilation_database')
|
conf.load('clang_compilation_database')
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
|
||||||
from waflib import Logs, TaskGen, Task, Build, Scripting
|
from waflib import Logs, TaskGen, Task, Build, Scripting
|
||||||
|
|
||||||
Task.Task.keep_last_cmd = True
|
Task.Task.keep_last_cmd = True
|
||||||
@ -63,11 +62,10 @@ class ClangDbContext(Build.BuildContext):
|
|||||||
cmd = task.last_cmd
|
cmd = task.last_cmd
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
directory = getattr(task, 'cwd', self.variant_dir)
|
|
||||||
f_node = task.inputs[0]
|
f_node = task.inputs[0]
|
||||||
filename = f_node.path_from(task.get_cwd())
|
filename = f_node.path_from(task.get_cwd())
|
||||||
entry = {
|
entry = {
|
||||||
"directory": directory,
|
"directory": task.get_cwd().abspath(),
|
||||||
"arguments": cmd,
|
"arguments": cmd,
|
||||||
"file": filename,
|
"file": filename,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user