mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46: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')
|
||||
"""
|
||||
|
||||
import os
|
||||
from waflib import Logs, TaskGen, Task, Build, Scripting
|
||||
|
||||
Task.Task.keep_last_cmd = True
|
||||
@ -63,11 +62,10 @@ class ClangDbContext(Build.BuildContext):
|
||||
cmd = task.last_cmd
|
||||
except AttributeError:
|
||||
continue
|
||||
directory = getattr(task, 'cwd', self.variant_dir)
|
||||
f_node = task.inputs[0]
|
||||
filename = f_node.path_from(task.get_cwd())
|
||||
entry = {
|
||||
"directory": directory,
|
||||
"directory": task.get_cwd().abspath(),
|
||||
"arguments": cmd,
|
||||
"file": filename,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user