Merge "Ignore_max_page_size option." into main
This commit is contained in:
commit
2e264ce8e1
2 changed files with 13 additions and 3 deletions
|
@ -486,14 +486,14 @@ func (p *prebuiltLibraryLinker) AndroidMkEntries(ctx AndroidMkContext, entries *
|
||||||
ctx.subAndroidMk(entries, p.libraryDecorator)
|
ctx.subAndroidMk(entries, p.libraryDecorator)
|
||||||
if p.shared() {
|
if p.shared() {
|
||||||
ctx.subAndroidMk(entries, &p.prebuiltLinker)
|
ctx.subAndroidMk(entries, &p.prebuiltLinker)
|
||||||
androidMkWriteAllowUndefinedSymbols(p.baseLinker, entries)
|
androidMkWritePrebuiltOptions(p.baseLinker, entries)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *prebuiltBinaryLinker) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) {
|
func (p *prebuiltBinaryLinker) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) {
|
||||||
ctx.subAndroidMk(entries, p.binaryDecorator)
|
ctx.subAndroidMk(entries, p.binaryDecorator)
|
||||||
ctx.subAndroidMk(entries, &p.prebuiltLinker)
|
ctx.subAndroidMk(entries, &p.prebuiltLinker)
|
||||||
androidMkWriteAllowUndefinedSymbols(p.baseLinker, entries)
|
androidMkWritePrebuiltOptions(p.baseLinker, entries)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *apiLibraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) {
|
func (a *apiLibraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) {
|
||||||
|
@ -524,11 +524,17 @@ func (a *apiHeadersDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *an
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func androidMkWriteAllowUndefinedSymbols(linker *baseLinker, entries *android.AndroidMkEntries) {
|
func androidMkWritePrebuiltOptions(linker *baseLinker, entries *android.AndroidMkEntries) {
|
||||||
allow := linker.Properties.Allow_undefined_symbols
|
allow := linker.Properties.Allow_undefined_symbols
|
||||||
if allow != nil {
|
if allow != nil {
|
||||||
entries.ExtraEntries = append(entries.ExtraEntries, func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
entries.ExtraEntries = append(entries.ExtraEntries, func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||||
entries.SetBool("LOCAL_ALLOW_UNDEFINED_SYMBOLS", *allow)
|
entries.SetBool("LOCAL_ALLOW_UNDEFINED_SYMBOLS", *allow)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
ignore := linker.Properties.Ignore_max_page_size
|
||||||
|
if ignore != nil {
|
||||||
|
entries.ExtraEntries = append(entries.ExtraEntries, func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||||
|
entries.SetBool("LOCAL_IGNORE_MAX_PAGE_SIZE", *ignore)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,10 @@ type BaseLinkerProperties struct {
|
||||||
// This flag should only be necessary for compiling low-level libraries like libc.
|
// This flag should only be necessary for compiling low-level libraries like libc.
|
||||||
Allow_undefined_symbols *bool `android:"arch_variant"`
|
Allow_undefined_symbols *bool `android:"arch_variant"`
|
||||||
|
|
||||||
|
// ignore max page size. By default, max page size must be the
|
||||||
|
// max page size set for the target.
|
||||||
|
Ignore_max_page_size *bool `android:"arch_variant"`
|
||||||
|
|
||||||
// don't link in libclang_rt.builtins-*.a
|
// don't link in libclang_rt.builtins-*.a
|
||||||
No_libcrt *bool `android:"arch_variant"`
|
No_libcrt *bool `android:"arch_variant"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue