diff options
author | Colin Cross <ccross@android.com> | 2022-09-21 11:06:07 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2022-09-21 11:06:07 -0700 |
commit | 57b2859e3cc7e415b053a704197c1e1096bd04bc (patch) | |
tree | c4b95d6dc311d395db864e84fecf613d277e4fa2 | |
parent | 52955b38cf5901d499974f83ef64456bd5a51118 (diff) | |
download | SEPolicy-main-16k.tar.gz |
Fix builds with an absolute OUT_DIRmain-16k
protoc assumes an include path of "." if none is specified, which is
the top of the source tree. When OUT_DIR is an absolute path,
the path to the genrule sandbox is not inside the top of the source
tree, and protoc can't map the sepolicy.proto file to an include
directory. Add the directory that contains sepolicy.proto to the
include directories.
Bug: 243196682
Test: OUT_DIR=/tmp/out m /tmp/out/soong/.intermediates/packages/modules/SEPolicy/API-level-policy/33/SEPolicy-33.pb.gen/gen/SEPolicy-33.pb.gen
Change-Id: I203e4424bdaeae57c03d172c97f9bfd91426106c
-rw-r--r-- | API-level-policy/Android.bp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/API-level-policy/Android.bp b/API-level-policy/Android.bp index f8179f2..0397a2f 100644 --- a/API-level-policy/Android.bp +++ b/API-level-policy/Android.bp @@ -57,7 +57,7 @@ genrule_defaults { tools: ["aprotoc"], tool_files: [ ":sepolicy_proto_def" ], cmd: "$(location aprotoc) --encode=com.android.sepolicy.SepolicyInfo " + - "$(location :sepolicy_proto_def) < $(in) > $(out)", + "-I $$(dirname $(location :sepolicy_proto_def)) $(location :sepolicy_proto_def) < $(in) > $(out)", } prebuilt_etc { |