aboutsummaryrefslogtreecommitdiffstats
path: root/cc/builder.go
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-02-14 13:58:34 -0800
committerDan Willemsen <dwillemsen@google.com>2018-02-22 16:48:35 -0800
commitab9f4268c01390b9d049c746e399b53a0f2c6dce (patch)
tree618eee4fd52d9e93ff04b1ae46a98765a9e65940 /cc/builder.go
parent336ad7a6676515ec1f2a432ca176af62ff180155 (diff)
downloadbuild_soong-ab9f4268c01390b9d049c746e399b53a0f2c6dce.tar.gz
build_soong-ab9f4268c01390b9d049c746e399b53a0f2c6dce.tar.bz2
build_soong-ab9f4268c01390b9d049c746e399b53a0f2c6dce.zip
Add proto.canonical_path_from_root
Historically, we've always passed '-I .' as the first argument to protoc, essentially treating all proto file package names as their full path in the android source tree. This would make sense in a monorepo world, but it makes less sense when we're pulling in external projects with established package names. So keep the same default (for now), but allow individual builds to opt into using local paths as the default names with 'canonical_path_from_root: false'. A cleanup effort and/or large scale change in the future could change the default to false. As part of this, run protoc once per input proto file, since the flags may need to change per-file. We'll also need this in order to specify --dependency_out in the future. Bug: 70704330 Test: aosp/master build-aosp_arm.ninja is identical Test: aosp/master soong/build.ninja has expected changes Test: m Test: Build protobuf test Change-Id: I9d6de9fd630326bbcced1c62a4a7e9546429b0ce
Diffstat (limited to 'cc/builder.go')
-rw-r--r--cc/builder.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/builder.go b/cc/builder.go
index 8f253caa..1d12b5f0 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -252,6 +252,7 @@ type builderFlags struct {
tidy bool
coverage bool
sAbiDump bool
+ protoRoot bool
systemIncludeFlags string