aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2017-07-19 01:46:36 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-07-19 01:46:36 +0000
commit92298313b1ac1b367575b57efddf8cd1517337f9 (patch)
tree77671e30158c4a9efa1fe659946edd70639d0ea1
parent417c13e05e368e291df6bb8ba9f2bd2a9af96cd5 (diff)
parentbde8cc0b63159a98db1a09c0cda94df43ccd6821 (diff)
downloadbuild_soong-92298313b1ac1b367575b57efddf8cd1517337f9.tar.gz
build_soong-92298313b1ac1b367575b57efddf8cd1517337f9.tar.bz2
build_soong-92298313b1ac1b367575b57efddf8cd1517337f9.zip
Merge "Move default libnativehelper include to mock dir." am: 3c8ba15bdd am: 2646b8f313
am: bde8cc0b63 Change-Id: Ic038a40a179db47a5f00376703c79409ba58d975
-rw-r--r--cc/config/global.go2
-rw-r--r--cc/makevars.go10
2 files changed, 11 insertions, 1 deletions
diff --git a/cc/config/global.go b/cc/config/global.go
index 2e16068c..65a211c6 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -124,7 +124,7 @@ func init() {
// This is used by non-NDK modules to get jni.h. export_include_dirs doesn't help
// with this, since there is no associated library.
pctx.PrefixedExistentPathsForSourcesVariable("CommonNativehelperInclude", "-I",
- []string{"libnativehelper/include/nativehelper"})
+ []string{"libnativehelper/include_deprecated"})
pctx.SourcePathVariable("ClangDefaultBase", ClangDefaultBase)
pctx.VariableFunc("ClangBase", func(config interface{}) (string, error) {
diff --git a/cc/makevars.go b/cc/makevars.go
index 11c31622..294f3e65 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -82,6 +82,16 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
ctx.Strict("RS_GLOBAL_INCLUDES", "${config.RsGlobalIncludes}")
+ nativeHelperIncludeFlags, err := ctx.Eval("${config.CommonNativehelperInclude}")
+ if err != nil {
+ panic(err)
+ }
+ nativeHelperIncludes, nativeHelperSystemIncludes := splitSystemIncludes(ctx, nativeHelperIncludeFlags)
+ if len(nativeHelperSystemIncludes) > 0 {
+ panic("native helper may not have any system includes")
+ }
+ ctx.Strict("JNI_H_INCLUDE", strings.Join(nativeHelperIncludes, " "))
+
includeFlags, err := ctx.Eval("${config.CommonGlobalIncludes}")
if err != nil {
panic(err)