Lines Matching refs:ctx

43 func makeStringOfKeys(ctx android.MakeVarsContext, key android.OnceKey) string {
44 set := getNamedMapForConfig(ctx.Config(), key)
73 func makeVarsProvider(ctx android.MakeVarsContext) {
74 vendorPublicLibraries := vendorPublicLibraries(ctx.Config())
76 ctx.Strict("LLVM_RELEASE_VERSION", "${config.ClangShortVersion}")
77 ctx.Strict("LLVM_PREBUILTS_VERSION", "${config.ClangVersion}")
78 ctx.Strict("LLVM_PREBUILTS_BASE", "${config.ClangBase}")
79 ctx.Strict("LLVM_PREBUILTS_PATH", "${config.ClangBin}")
80 ctx.Strict("CLANG", "${config.ClangBin}/clang")
81 ctx.Strict("CLANG_CXX", "${config.ClangBin}/clang++")
82 ctx.Strict("LLVM_AS", "${config.ClangBin}/llvm-as")
83 ctx.Strict("LLVM_LINK", "${config.ClangBin}/llvm-link")
84 ctx.Strict("LLVM_OBJCOPY", "${config.ClangBin}/llvm-objcopy")
85 ctx.Strict("LLVM_STRIP", "${config.ClangBin}/llvm-strip")
86 ctx.Strict("PATH_TO_CLANG_TIDY", "${config.ClangBin}/clang-tidy")
87 ctx.StrictSorted("CLANG_CONFIG_UNKNOWN_CFLAGS", strings.Join(config.ClangUnknownCflags, " "))
89 ctx.Strict("RS_LLVM_PREBUILTS_VERSION", "${config.RSClangVersion}")
90 ctx.Strict("RS_LLVM_PREBUILTS_BASE", "${config.RSClangBase}")
91 ctx.Strict("RS_LLVM_PREBUILTS_PATH", "${config.RSLLVMPrebuiltsPath}")
92 ctx.Strict("RS_LLVM_INCLUDES", "${config.RSIncludePath}")
93 ctx.Strict("RS_CLANG", "${config.RSLLVMPrebuiltsPath}/clang")
94 ctx.Strict("RS_LLVM_AS", "${config.RSLLVMPrebuiltsPath}/llvm-as")
95 ctx.Strict("RS_LLVM_LINK", "${config.RSLLVMPrebuiltsPath}/llvm-link")
97 ctx.Strict("CLANG_EXTERNAL_CFLAGS", "${config.ClangExternalCflags}")
98 ctx.Strict("GLOBAL_CLANG_CFLAGS_NO_OVERRIDE", "${config.NoOverrideClangGlobalCflags}")
99 ctx.Strict("GLOBAL_CLANG_CPPFLAGS_NO_OVERRIDE", "")
101 ctx.Strict("BOARD_VNDK_VERSION", ctx.DeviceConfig().VndkVersion())
105 ctx.VisitAllModules(func(module android.Module) {
116 ctx.Strict("VENDOR_PUBLIC_LIBRARIES", strings.Join(exportedVendorPublicLibraries, " "))
119 ctx.Strict("LSDUMP_PATHS", strings.Join(lsdumpPaths, " "))
121 ctx.Strict("ANDROID_WARNING_ALLOWED_PROJECTS", makeStringOfWarningAllowedProjects())
122 ctx.Strict("SOONG_MODULES_ADDED_WALL", makeStringOfKeys(ctx, modulesAddedWallKey))
123 ctx.Strict("SOONG_MODULES_USING_WNO_ERROR", makeStringOfKeys(ctx, modulesUsingWnoErrorKey))
124ctx.Strict("SOONG_MODULES_MISSING_PGO_PROFILE_FILE", makeStringOfKeys(ctx, modulesMissingProfileFi…
126 ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS", strings.Join(asanCflags, " "))
127 ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS", strings.Join(asanLdflags, " "))
129 ctx.Strict("HWADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS", strings.Join(hwasanCflags, " "))
130 ctx.Strict("HWADDRESS_SANITIZER_GLOBAL_OPTIONS", strings.Join(hwasanGlobalOptions, ","))
132 ctx.Strict("CFI_EXTRA_CFLAGS", strings.Join(cfiCflags, " "))
133 ctx.Strict("CFI_EXTRA_ASFLAGS", strings.Join(cfiAsflags, " "))
134 ctx.Strict("CFI_EXTRA_LDFLAGS", strings.Join(cfiLdflags, " "))
136 ctx.Strict("INTEGER_OVERFLOW_EXTRA_CFLAGS", strings.Join(intOverflowCflags, " "))
138 ctx.Strict("DEFAULT_C_STD_VERSION", config.CStdVersion)
139 ctx.Strict("DEFAULT_CPP_STD_VERSION", config.CppStdVersion)
140 ctx.Strict("EXPERIMENTAL_C_STD_VERSION", config.ExperimentalCStdVersion)
141 ctx.Strict("EXPERIMENTAL_CPP_STD_VERSION", config.ExperimentalCppStdVersion)
143 ctx.Strict("DEFAULT_GLOBAL_TIDY_CHECKS", "${config.TidyDefaultGlobalChecks}")
144 ctx.Strict("DEFAULT_LOCAL_TIDY_CHECKS", joinLocalTidyChecks(config.DefaultLocalTidyChecks))
145 ctx.Strict("DEFAULT_TIDY_HEADER_DIRS", "${config.TidyDefaultHeaderDirs}")
146 ctx.Strict("WITH_TIDY_FLAGS", "${config.TidyWithTidyFlags}")
148 ctx.Strict("AIDL_CPP", "${aidlCmd}")
149 ctx.Strict("ALLOWED_MANUAL_INTERFACE_PATHS", strings.Join(allowedManualInterfacePaths, " "))
151 ctx.Strict("M4", "${m4Cmd}")
153 ctx.Strict("RS_GLOBAL_INCLUDES", "${config.RsGlobalIncludes}")
155 ctx.Strict("SOONG_STRIP_PATH", "${stripPath}")
156 ctx.Strict("XZ", "${xzCmd}")
158 nativeHelperIncludeFlags, err := ctx.Eval("${config.CommonNativehelperInclude}")
162 …nativeHelperIncludes, nativeHelperSystemIncludes := splitSystemIncludes(ctx, nativeHelperIncludeFl…
166 ctx.Strict("JNI_H_INCLUDE", strings.Join(nativeHelperIncludes, " "))
168 includeFlags, err := ctx.Eval("${config.CommonGlobalIncludes}")
172 includes, systemIncludes := splitSystemIncludes(ctx, includeFlags)
173 ctx.StrictRaw("SRC_HEADERS", strings.Join(includes, " "))
174 ctx.StrictRaw("SRC_SYSTEM_HEADERS", strings.Join(systemIncludes, " "))
177 ctx.Strict("NDK_KNOWN_LIBS", strings.Join(ndkKnownLibs, " "))
179 hostTargets := ctx.Config().Targets[android.BuildOs]
180 makeVarsToolchain(ctx, "", hostTargets[0])
182 makeVarsToolchain(ctx, "2ND_", hostTargets[1])
185 deviceTargets := ctx.Config().Targets[android.Android]
186 makeVarsToolchain(ctx, "", deviceTargets[0])
188 makeVarsToolchain(ctx, "2ND_", deviceTargets[1])
192 func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
213 if target.Os.Class == android.Host && ctx.Config().HostStaticBinaries() {
217 includeFlags, err := ctx.Eval(toolchain.IncludeFlags())
221 includes, systemIncludes := splitSystemIncludes(ctx, includeFlags)
222 ctx.StrictRaw(makePrefix+"C_INCLUDES", strings.Join(includes, " "))
223 ctx.StrictRaw(makePrefix+"C_SYSTEM_INCLUDES", strings.Join(systemIncludes, " "))
230 ctx.Strict(makePrefix+"arm_CFLAGS", flags)
236 ctx.Strict(makePrefix+"thumb_CFLAGS", flags)
242 ctx.Strict(clangPrefix+"TRIPLE", toolchain.ClangTriple())
243 ctx.Strict(clangPrefix+"GLOBAL_CFLAGS", strings.Join([]string{
251 ctx.Strict(clangPrefix+"GLOBAL_CPPFLAGS", strings.Join([]string{
256 ctx.Strict(clangPrefix+"GLOBAL_LDFLAGS", strings.Join([]string{
263 ctx.Strict(clangPrefix+"GLOBAL_LLDFLAGS", strings.Join([]string{
272ctx.Strict(secondPrefix+"ADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.AddressSani…
273ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_RUNTIME_LIBRARY", strings.TrimSuffix(config.HWAddress…
274ctx.Strict(secondPrefix+"HWADDRESS_SANITIZER_STATIC_LIBRARY", strings.TrimSuffix(config.HWAddressS…
275ctx.Strict(secondPrefix+"UBSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehaviorSaniti…
276ctx.Strict(secondPrefix+"UBSAN_MINIMAL_RUNTIME_LIBRARY", strings.TrimSuffix(config.UndefinedBehavi…
277ctx.Strict(secondPrefix+"TSAN_RUNTIME_LIBRARY", strings.TrimSuffix(config.ThreadSanitizerRuntimeLi…
278ctx.Strict(secondPrefix+"SCUDO_RUNTIME_LIBRARY", strings.TrimSuffix(config.ScudoRuntimeLibrary(too…
279ctx.Strict(secondPrefix+"SCUDO_MINIMAL_RUNTIME_LIBRARY", strings.TrimSuffix(config.ScudoMinimalRun…
283 ctx.Strict("CLANG_CONFIG_"+target.Arch.ArchType.Name+"_"+typePrefix+"TRIPLE",
287 ctx.Strict(makePrefix+"AR", "${config.MacArPath}")
288 ctx.Strict(makePrefix+"NM", "${config.MacToolPath}/nm")
289 ctx.Strict(makePrefix+"OTOOL", "${config.MacToolPath}/otool")
290 ctx.Strict(makePrefix+"STRIP", "${config.MacStripPath}")
292 ctx.Strict(makePrefix+"AR", "${config.ClangBin}/llvm-ar")
293 ctx.Strict(makePrefix+"READELF", gccCmd(toolchain, "readelf"))
294 ctx.Strict(makePrefix+"NM", gccCmd(toolchain, "nm"))
295 ctx.Strict(makePrefix+"STRIP", gccCmd(toolchain, "strip"))
299 ctx.Strict(makePrefix+"OBJCOPY", gccCmd(toolchain, "objcopy"))
300 ctx.Strict(makePrefix+"LD", gccCmd(toolchain, "ld"))
301 ctx.Strict(makePrefix+"GCC_VERSION", toolchain.GccVersion())
302 ctx.Strict(makePrefix+"NDK_TRIPLE", config.NDKTriple(toolchain))
303 ctx.Strict(makePrefix+"TOOLS_PREFIX", gccCmd(toolchain, ""))
307 ctx.Strict(makePrefix+"AVAILABLE_LIBRARIES", strings.Join(toolchain.AvailableLibraries(), " "))
310 ctx.Strict(makePrefix+"SHLIB_SUFFIX", toolchain.ShlibSuffix())
311 ctx.Strict(makePrefix+"EXECUTABLE_SUFFIX", toolchain.ExecutableSuffix())
314 func splitSystemIncludes(ctx android.MakeVarsContext, val string) (includes, systemIncludes []strin…
315 flags, err := ctx.Eval(val)