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: Ia3fdb8f38e83ad8225a72c8de2804db23a90ef9b
diff --git a/cc/compiler.go b/cc/compiler.go
index a65ddf8..b22cca1 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -236,7 +236,7 @@
flags.GlobalFlags = append(flags.GlobalFlags, "-I"+android.PathForModuleSrc(ctx).String())
flags.YasmFlags = append(flags.YasmFlags, "-I"+android.PathForModuleSrc(ctx).String())
- if !(ctx.sdk() || ctx.vndk()) || ctx.Host() {
+ if !(ctx.sdk() || ctx.useVndk()) || ctx.Host() {
flags.SystemIncludeFlags = append(flags.SystemIncludeFlags,
"${config.CommonGlobalIncludes}",
tc.IncludeFlags(),
@@ -272,7 +272,7 @@
flags.SystemIncludeFlags = append(flags.SystemIncludeFlags, "-isystem "+legacyIncludes)
}
- if ctx.vndk() {
+ if ctx.useVndk() {
flags.GlobalFlags = append(flags.GlobalFlags,
"-D__ANDROID_API__=__ANDROID_API_FUTURE__", "-D__ANDROID_VNDK__")
}
@@ -405,7 +405,7 @@
flags.CppFlags = append([]string{"-std=" + cppStd}, flags.CppFlags...)
}
- if ctx.vndk() {
+ if ctx.useVndk() {
flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...)
}
@@ -490,7 +490,7 @@
pathDeps := deps.GeneratedHeaders
pathDeps = append(pathDeps, ndkPathDeps(ctx)...)
- if ctx.vndk() {
+ if ctx.useVndk() {
compiler.Properties.Srcs = append(compiler.Properties.Srcs,
compiler.Properties.Target.Vendor.Srcs...)