diff options
author | Colin Cross <ccross@android.com> | 2015-03-18 17:17:35 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-03-19 10:51:41 -0700 |
commit | efd8e48c4dac95203fdaddf81602e506bdbbf266 (patch) | |
tree | 6103d3cffd5b5f8e835c0c8fc28dc6c5dffeeafe /cc | |
parent | 5049f02e6040f38aff9722579fc7cc8c05ff9885 (diff) | |
download | build_soong-efd8e48c4dac95203fdaddf81602e506bdbbf266.tar.gz build_soong-efd8e48c4dac95203fdaddf81602e506bdbbf266.tar.bz2 build_soong-efd8e48c4dac95203fdaddf81602e506bdbbf266.zip |
Add sdk_version property
Add sdk_version property that will be used later for NDK builds.
For now, use it to determine if libnativehelper/include/nativehelper
should be added to the global include dirs.
Change-Id: I4e0f9b3f27c380b1ac28f163b1d2b43a46d7191c
Diffstat (limited to 'cc')
-rw-r--r-- | cc/cc.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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") } |