Merge "Move default libnativehelper include to mock dir." am: 3c8ba15bdd am: 2646b8f313

am: bde8cc0b63

Change-Id: Ic038a40a179db47a5f00376703c79409ba58d975
This commit is contained in:
Steven Moreland 2017-07-19 01:46:36 +00:00 committed by android-build-merger
commit 92298313b1
2 changed files with 11 additions and 1 deletions

View File

@ -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) {

View File

@ -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)