Remove explicit suffixes from (ll)ndk_library
Soong can rename these automatically for internal use, so don't require users to set these. Bug: 33241851 Test: Android-aosp_arm.mk is the same before/after Test: build.ninja is the same before/after Test: build-aosp_arm.ninja is the same before/after Merged-In: Ia92356a0ec079f908fd49812231228046783e50d Change-Id: Ia92356a0ec079f908fd49812231228046783e50d
This commit is contained in:
committed by
Steven Moreland
parent
2ce95652a8
commit
01a90597bc
@@ -29,15 +29,10 @@ var (
|
||||
|
||||
// Creates a stub shared library based on the provided version file.
|
||||
//
|
||||
// The name of the generated file will be based on the module name by stripping
|
||||
// the ".llndk" suffix from the module name. Module names must end with ".llndk"
|
||||
// (as a convention to allow soong to guess the LL-NDK name of a dependency when
|
||||
// needed). "libfoo.llndk" will generate "libfoo.so".
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// llndk_library {
|
||||
// name: "libfoo.llndk",
|
||||
// name: "libfoo",
|
||||
// symbol_file: "libfoo.map.txt",
|
||||
// export_include_dirs: ["include_vndk"],
|
||||
// }
|
||||
@@ -69,10 +64,6 @@ type llndkStubDecorator struct {
|
||||
}
|
||||
|
||||
func (stub *llndkStubDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
|
||||
if !strings.HasSuffix(ctx.ModuleName(), llndkLibrarySuffix) {
|
||||
ctx.ModuleErrorf("llndk_library modules names must be suffixed with %q\n",
|
||||
llndkLibrarySuffix)
|
||||
}
|
||||
objs, versionScript := compileStubLibrary(ctx, flags, stub.Properties.Symbol_file, "current", "--vndk")
|
||||
stub.versionScriptPath = versionScript
|
||||
return objs
|
||||
@@ -82,6 +73,10 @@ func (stub *llndkStubDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
||||
return Deps{}
|
||||
}
|
||||
|
||||
func (stub *llndkStubDecorator) Name(name string) string {
|
||||
return name + llndkLibrarySuffix
|
||||
}
|
||||
|
||||
func (stub *llndkStubDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
stub.libraryDecorator.libName = strings.TrimSuffix(ctx.ModuleName(),
|
||||
llndkLibrarySuffix)
|
||||
|
Reference in New Issue
Block a user