Allow libnativehelper to be missing
Some branches may not include libnativehelper, or anything that depends on jni.h Change-Id: Id8bb9c101aecfacc5d62048818ea0c1c88b7d77c
This commit is contained in:
parent
6b827c21d2
commit
e0378dd4df
6
cc/cc.go
6
cc/cc.go
|
@ -137,6 +137,10 @@ func init() {
|
|||
"frameworks/av/include",
|
||||
"frameworks/base/include",
|
||||
})
|
||||
// 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.PrefixedPathsForOptionalSourceVariable("commonNativehelperInclude", "-I",
|
||||
[]string{"libnativehelper/include/nativehelper"})
|
||||
|
||||
pctx.SourcePathVariable("clangPath", "prebuilts/clang/host/${HostPrebuiltTag}/3.8/bin")
|
||||
}
|
||||
|
@ -502,7 +506,7 @@ func (c *CCBase) collectFlags(ctx common.AndroidModuleContext, toolchain Toolcha
|
|||
flags.GlobalFlags = append(flags.GlobalFlags,
|
||||
"${commonGlobalIncludes}",
|
||||
toolchain.IncludeFlags(),
|
||||
"-I"+common.PathForSource(ctx, "libnativehelper/include/nativehelper").String())
|
||||
"${commonNativehelperInclude}")
|
||||
}
|
||||
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, []string{
|
||||
|
|
Loading…
Reference in New Issue