Merge "Soong: Add synopsis to several modules under cc package."
This commit is contained in:
@@ -57,13 +57,13 @@ func init() {
|
|||||||
android.RegisterModuleType("cc_binary_host", binaryHostFactory)
|
android.RegisterModuleType("cc_binary_host", binaryHostFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for binaries
|
// cc_binary produces a binary that is runnable on a device.
|
||||||
func BinaryFactory() android.Module {
|
func BinaryFactory() android.Module {
|
||||||
module, _ := NewBinary(android.HostAndDeviceSupported)
|
module, _ := NewBinary(android.HostAndDeviceSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for host binaries
|
// cc_binary_host produces a binary that is runnable on a host.
|
||||||
func binaryHostFactory() android.Module {
|
func binaryHostFactory() android.Module {
|
||||||
module, _ := NewBinary(android.HostSupported)
|
module, _ := NewBinary(android.HostSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
|
5
cc/cc.go
5
cc/cc.go
@@ -1966,6 +1966,11 @@ type Defaults struct {
|
|||||||
func (*Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
func (*Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cc_defaults provides a set of properties that can be inherited by other cc
|
||||||
|
// modules. A module can use the properties from a cc_defaults using
|
||||||
|
// `defaults: ["<:default_module_name>"]`. Properties of both modules are
|
||||||
|
// merged (when possible) by prepending the default module's values to the
|
||||||
|
// depending module's values.
|
||||||
func defaultsFactory() android.Module {
|
func defaultsFactory() android.Module {
|
||||||
return DefaultsFactory()
|
return DefaultsFactory()
|
||||||
}
|
}
|
||||||
|
20
cc/test.go
20
cc/test.go
@@ -74,31 +74,41 @@ func init() {
|
|||||||
android.RegisterModuleType("cc_benchmark_host", BenchmarkHostFactory)
|
android.RegisterModuleType("cc_benchmark_host", BenchmarkHostFactory)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for tests
|
// cc_test generates a test config file and an executable binary file to test
|
||||||
|
// specific functionality on a device. The executable binary gets an implicit
|
||||||
|
// static_libs dependency on libgtests unless the gtest flag is set to false.
|
||||||
func TestFactory() android.Module {
|
func TestFactory() android.Module {
|
||||||
module := NewTest(android.HostAndDeviceSupported)
|
module := NewTest(android.HostAndDeviceSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for test libraries
|
// cc_test_library creates an archive of files (i.e. .o files) which is later
|
||||||
|
// referenced by another module (such as cc_test, cc_defaults or cc_test_library)
|
||||||
|
// for archiving or linking.
|
||||||
func TestLibraryFactory() android.Module {
|
func TestLibraryFactory() android.Module {
|
||||||
module := NewTestLibrary(android.HostAndDeviceSupported)
|
module := NewTestLibrary(android.HostAndDeviceSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for benchmarks
|
// cc_benchmark compiles an executable binary that performs benchmark testing
|
||||||
|
// of a specific component in a device. Additional files such as test suites
|
||||||
|
// and test configuration are installed on the side of the compiled executed
|
||||||
|
// binary.
|
||||||
func BenchmarkFactory() android.Module {
|
func BenchmarkFactory() android.Module {
|
||||||
module := NewBenchmark(android.HostAndDeviceSupported)
|
module := NewBenchmark(android.HostAndDeviceSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for host tests
|
// cc_test_host compiles a test host binary.
|
||||||
func TestHostFactory() android.Module {
|
func TestHostFactory() android.Module {
|
||||||
module := NewTest(android.HostSupported)
|
module := NewTest(android.HostSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module factory for host benchmarks
|
// cc_benchmark_host compiles an executable binary that performs benchmark
|
||||||
|
// testing of a specific component in the host. Additional files such as
|
||||||
|
// test suites and test configuration are installed on the side of the
|
||||||
|
// compiled executed binary.
|
||||||
func BenchmarkHostFactory() android.Module {
|
func BenchmarkHostFactory() android.Module {
|
||||||
module := NewBenchmark(android.HostSupported)
|
module := NewBenchmark(android.HostSupported)
|
||||||
return module.Init()
|
return module.Init()
|
||||||
|
Reference in New Issue
Block a user