Add target.ramdisk
am: cf4832c8bc
Change-Id: Iffaa86779dc03939bc3e94f6fba53c5b9f6dbbbb
This commit is contained in:
@@ -757,6 +757,13 @@ func (library *libraryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
|||||||
deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, library.baseLinker.Properties.Target.Recovery.Exclude_shared_libs)
|
deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, library.baseLinker.Properties.Target.Recovery.Exclude_shared_libs)
|
||||||
deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, library.baseLinker.Properties.Target.Recovery.Exclude_static_libs)
|
deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, library.baseLinker.Properties.Target.Recovery.Exclude_static_libs)
|
||||||
}
|
}
|
||||||
|
if ctx.inRamdisk() {
|
||||||
|
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, library.baseLinker.Properties.Target.Ramdisk.Exclude_static_libs)
|
||||||
|
deps.SharedLibs = removeListFromList(deps.SharedLibs, library.baseLinker.Properties.Target.Ramdisk.Exclude_shared_libs)
|
||||||
|
deps.StaticLibs = removeListFromList(deps.StaticLibs, library.baseLinker.Properties.Target.Ramdisk.Exclude_static_libs)
|
||||||
|
deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, library.baseLinker.Properties.Target.Ramdisk.Exclude_shared_libs)
|
||||||
|
deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, library.baseLinker.Properties.Target.Ramdisk.Exclude_static_libs)
|
||||||
|
}
|
||||||
|
|
||||||
return deps
|
return deps
|
||||||
}
|
}
|
||||||
|
22
cc/linker.go
22
cc/linker.go
@@ -141,6 +141,19 @@ type BaseLinkerProperties struct {
|
|||||||
// of the C/C++ module.
|
// of the C/C++ module.
|
||||||
Exclude_header_libs []string
|
Exclude_header_libs []string
|
||||||
}
|
}
|
||||||
|
Ramdisk struct {
|
||||||
|
// list of static libs that only should be used to build the recovery
|
||||||
|
// variant of the C/C++ module.
|
||||||
|
Static_libs []string
|
||||||
|
|
||||||
|
// list of shared libs that should not be used to build
|
||||||
|
// the ramdisk variant of the C/C++ module.
|
||||||
|
Exclude_shared_libs []string
|
||||||
|
|
||||||
|
// list of static libs that should not be used to build
|
||||||
|
// the ramdisk variant of the C/C++ module.
|
||||||
|
Exclude_static_libs []string
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// make android::build:GetBuildNumber() available containing the build ID.
|
// make android::build:GetBuildNumber() available containing the build ID.
|
||||||
@@ -223,6 +236,15 @@ func (linker *baseLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
|||||||
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs)
|
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctx.inRamdisk() {
|
||||||
|
deps.SharedLibs = removeListFromList(deps.SharedLibs, linker.Properties.Target.Recovery.Exclude_shared_libs)
|
||||||
|
deps.ReexportSharedLibHeaders = removeListFromList(deps.ReexportSharedLibHeaders, linker.Properties.Target.Recovery.Exclude_shared_libs)
|
||||||
|
deps.StaticLibs = append(deps.StaticLibs, linker.Properties.Target.Recovery.Static_libs...)
|
||||||
|
deps.StaticLibs = removeListFromList(deps.StaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs)
|
||||||
|
deps.ReexportStaticLibHeaders = removeListFromList(deps.ReexportStaticLibHeaders, linker.Properties.Target.Recovery.Exclude_static_libs)
|
||||||
|
deps.WholeStaticLibs = removeListFromList(deps.WholeStaticLibs, linker.Properties.Target.Recovery.Exclude_static_libs)
|
||||||
|
}
|
||||||
|
|
||||||
if ctx.toolchain().Bionic() {
|
if ctx.toolchain().Bionic() {
|
||||||
// libclang_rt.builtins and libatomic have to be last on the command line
|
// libclang_rt.builtins and libatomic have to be last on the command line
|
||||||
if !Bool(linker.Properties.No_libcrt) {
|
if !Bool(linker.Properties.No_libcrt) {
|
||||||
|
Reference in New Issue
Block a user