Some clarifications in preparation to automatically order linker dependencies
Test: Browse the code and determine whether it's easier to understand
Bug: 66260943
Change-Id: I88c24a8a31ef68f428919087d206433659265684
diff --git a/cc/library.go b/cc/library.go
index 151b63d..e963ecb 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -156,7 +156,7 @@
}
func (f *flagExporter) exportedIncludes(ctx ModuleContext) android.Paths {
- if ctx.vndk() && f.Properties.Target.Vendor.Export_include_dirs != nil {
+ if ctx.useVndk() && f.Properties.Target.Vendor.Export_include_dirs != nil {
return android.PathsForModuleSrc(ctx, f.Properties.Target.Vendor.Export_include_dirs)
} else {
return android.PathsForModuleSrc(ctx, f.Properties.Export_include_dirs)
@@ -435,7 +435,7 @@
deps.SharedLibs = append(deps.SharedLibs, library.Properties.Static.Shared_libs...)
} else if library.shared() {
if ctx.toolchain().Bionic() && !Bool(library.baseLinker.Properties.Nocrt) {
- if !ctx.sdk() {
+ if !ctx.useSdk() {
deps.CrtBegin = "crtbegin_so"
deps.CrtEnd = "crtend_so"
} else {
@@ -698,7 +698,7 @@
func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
if library.shared() {
if ctx.Device() {
- if ctx.vndk() {
+ if ctx.useVndk() {
if ctx.isVndkSp() {
library.baseInstaller.subDir = "vndk-sp"
} else if ctx.isVndk() {