summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Patrice Arruda <patricearruda@google.com> 2019-04-03 08:43:30 -0700
committer Patrice Arruda <patricearruda@google.com> 2019-04-09 18:50:44 -0700
commit6ea42118f22237258b5384b6ef55c916c0ffb612 (patch)
treeb5d1e4603b2b24d748cab694440d5f6b091a21c2
parentad459bb8db7c760bcbe0ba4166b90f3a12312c84 (diff)
Soong: Add synopsis to ndk_* modules.
Added synopsis to the following modules under cc package: * ndk_headers * ndk_library * versioned_ndk_headers * preprocessed_ndk_headers Bug: b/128337482 Test: Generated the documentation and verified that the synopsis was added to each of the module. Change-Id: I2146919528cf039ed9327b3358de5b1bdb28275a
-rw-r--r--cc/ndk_headers.go17
-rw-r--r--cc/ndk_library.go2
2 files changed, 19 insertions, 0 deletions
diff --git a/cc/ndk_headers.go b/cc/ndk_headers.go
index 5e45c1ac3..40651280d 100644
--- a/cc/ndk_headers.go
+++ b/cc/ndk_headers.go
@@ -159,6 +159,16 @@ func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
}
+// ndk_headers installs the sets of ndk headers defined in the srcs property
+// to the sysroot base + "usr/include" + to directory + directory component.
+// ndk_headers requires the license file to be specified. Example:
+//
+// Given:
+// sysroot base = "ndk/sysroot"
+// from = "include/foo"
+// to = "bar"
+// header = "include/foo/woodly/doodly.h"
+// output path = "ndk/sysroot/usr/include/bar/woodly/doodly.h"
func ndkHeadersFactory() android.Module {
module := &headerModule{}
module.AddProperties(&module.properties)
@@ -278,6 +288,11 @@ func processHeadersWithVersioner(ctx android.ModuleContext, srcDir, outDir andro
return timestampFile
}
+// versioned_ndk_headers preprocesses the headers with the bionic versioner:
+// https://android.googlesource.com/platform/bionic/+/master/tools/versioner/README.md.
+// Unlike the ndk_headers soong module, versioned_ndk_headers operates on a
+// directory level specified in `from` property. This is only used to process
+// the bionic/libc/include directory.
func versionedNdkHeadersFactory() android.Module {
module := &versionedHeaderModule{}
@@ -360,6 +375,8 @@ func (m *preprocessedHeadersModule) GenerateAndroidBuildActions(ctx android.Modu
}
}
+// preprocessed_ndk_headers preprocesses all the ndk headers listed in the srcs
+// property by executing the command defined in the preprocessor property.
func preprocessedNdkHeadersFactory() android.Module {
module := &preprocessedHeadersModule{}
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index 7199467b6..c63b200a2 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -377,6 +377,8 @@ func newStubLibrary() *Module {
return module
}
+// ndk_library creates a stub library that exposes dummy implementation
+// of functions and variables for use at build time only.
func ndkLibraryFactory() android.Module {
module := newStubLibrary()
android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth)