summaryrefslogtreecommitdiff
path: root/cc/compdb.go
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2019-01-28 19:18:33 -0800
committer Alex Light <allight@google.com> 2019-01-29 17:27:37 +0000
commite81281865672b80c21dfbdfbc07246335caa0186 (patch)
tree27aa135819a33069d4a6c4fc1809a9613637f011 /cc/compdb.go
parent0425aa13ec9893b2cf492f2e6bc3e9258664570f (diff)
Update compdb to put full path to compiler
Some language servers (vscode) seem to have started to rely on the compiler being an absolute path recently. This updates the compdb generator to match this expectation. Bug: https://github.com/Microsoft/vscode-cpptools/issues/3112 Test: m nothing && m SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing Test: Open vscode Change-Id: Id146d69c2b808b23896132bbd4bc38ed5c7fd9c7
Diffstat (limited to 'cc/compdb.go')
-rw-r--r--cc/compdb.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/compdb.go b/cc/compdb.go
index 4dfc55b6d..110265174 100644
--- a/cc/compdb.go
+++ b/cc/compdb.go
@@ -170,14 +170,14 @@ func generateCompdbProject(compiledModule CompiledInterface, ctx android.Singlet
return
}
- pathToCC, err := ctx.Eval(pctx, "${config.ClangBin}/")
+ rootDir := getCompdbAndroidSrcRootDirectory(ctx)
+ pathToCC, err := ctx.Eval(pctx, rootDir+"/${config.ClangBin}/")
ccPath := "/bin/false"
cxxPath := "/bin/false"
if err == nil {
ccPath = pathToCC + "clang"
cxxPath = pathToCC + "clang++"
}
- rootDir := getCompdbAndroidSrcRootDirectory(ctx)
for _, src := range srcs {
if _, ok := builds[src.String()]; !ok {
builds[src.String()] = compDbEntry{