aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc')
-rw-r--r--cc/cc.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 3ffe26f4..f76706b8 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -209,6 +209,9 @@ type ccProperties struct {
Release struct {
Cflags []string `android:"arch_variant"`
} `android:"arch_variant"`
+
+ // Minimum sdk version supported when compiling against the ndk
+ Sdk_version string
}
type unusedProperties struct {
@@ -438,6 +441,10 @@ func (c *ccBase) flags(ctx common.AndroidModuleContext, toolchain toolchain) ccF
common.ModuleGenDir(ctx),
}...)
+ if c.properties.Sdk_version == "" {
+ flags.includeDirs = append(flags.includeDirs, "${SrcDir}/libnativehelper/include/nativehelper")
+ }
+
if arch.HostOrDevice.Device() && !c.properties.Allow_undefined_symbols {
flags.ldFlags = append(flags.ldFlags, "-Wl,--no-undefined")
}