diff options
author | Jeff Gaston <jeffrygaston@google.com> | 2017-09-27 17:01:44 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-10-18 18:06:02 +0000 |
commit | af3cc2d23c4473828c9e4596bce36c2ba762e992 (patch) | |
tree | 7db84020037e4f83ff17fae7e033dfb85c46987e /cc/compiler.go | |
parent | 16b9ce4dff7d522aca993b38e4e44be309ba658b (diff) | |
download | build_soong-af3cc2d23c4473828c9e4596bce36c2ba762e992.tar.gz build_soong-af3cc2d23c4473828c9e4596bce36c2ba762e992.tar.bz2 build_soong-af3cc2d23c4473828c9e4596bce36c2ba762e992.zip |
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
Diffstat (limited to 'cc/compiler.go')
-rw-r--r-- | cc/compiler.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cc/compiler.go b/cc/compiler.go index 3b3bbbb1..102bc7a4 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -236,7 +236,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag 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.useSdk() || ctx.useVndk()) || ctx.Host() { flags.SystemIncludeFlags = append(flags.SystemIncludeFlags, "${config.CommonGlobalIncludes}", tc.IncludeFlags(), @@ -244,7 +244,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag } } - if ctx.sdk() { + if ctx.useSdk() { // The NDK headers are installed to a common sysroot. While a more // typical Soong approach would be to only make the headers for the // library you're using available, we're trying to emulate the NDK @@ -272,7 +272,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag 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__") } @@ -366,7 +366,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag flags.GlobalFlags = append(flags.GlobalFlags, tc.ToolchainCflags()) } - if !ctx.sdk() { + if !ctx.useSdk() { cStd := config.CStdVersion if compiler.Properties.C_std == "experimental" { cStd = config.ExperimentalCStdVersion @@ -405,7 +405,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag 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)...) } @@ -478,7 +478,7 @@ func (compiler *baseCompiler) hasSrcExt(ext string) bool { var gnuToCReplacer = strings.NewReplacer("gnu", "c") func ndkPathDeps(ctx ModuleContext) android.Paths { - if ctx.sdk() { + if ctx.useSdk() { // The NDK sysroot timestamp file depends on all the NDK sysroot files // (headers and libraries). return android.Paths{getNdkSysrootTimestampFile(ctx)} |