/build/soong/java/config/ |
D | makevars.go | 27 func makeVarsProvider(ctx android.MakeVarsContext) { 28 ctx.Strict("FRAMEWORK_LIBRARIES", strings.Join(FrameworkLibraries, " ")) 31 …ctx.Strict("LEGACY_CORE_PLATFORM_BOOTCLASSPATH_LIBRARIES", strings.Join(LegacyCorePlatformBootclas… 32 ctx.Strict("LEGACY_CORE_PLATFORM_SYSTEM_MODULES", LegacyCorePlatformSystemModules) 34 ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}") 35 ctx.Strict("ANDROID_JAVA8_HOME", "prebuilts/jdk/jdk8/${hostPrebuiltTag}") 36 ctx.Strict("ANDROID_JAVA9_HOME", "prebuilts/jdk/jdk9/${hostPrebuiltTag}") 37 ctx.Strict("ANDROID_JAVA11_HOME", "prebuilts/jdk/jdk11/${hostPrebuiltTag}") 38 ctx.Strict("ANDROID_JAVA_TOOLCHAIN", "${JavaToolchain}") 39 ctx.Strict("JAVA", "${JavaCmd} ${JavaVmFlags}") [all …]
|
D | config.go | 92 pctx.VariableFunc("JavaHome", func(ctx android.PackageVarContext) string { 94 return ctx.Config().Getenv("ANDROID_JAVA_HOME") 96 pctx.VariableFunc("JlinkVersion", func(ctx android.PackageVarContext) string { 97 if override := ctx.Config().Getenv("OVERRIDE_JLINK_VERSION_NUMBER"); override != "" { 129 pctx.VariableFunc("TurbineJar", func(ctx android.PackageVarContext) string { 131 if ctx.Config().UnbundledBuild() { 134 return ctx.Config().HostJavaToolPath(ctx, turbine).String() 180 pctx.VariableFunc(name, func(ctx android.PackageVarContext) string { 181 if ctx.Config().UnbundledBuild() || ctx.Config().IsPdkBuild() { 184 return ctx.Config().HostToolPath(ctx, tool).String() [all …]
|
/build/soong/android/ |
D | mutator_test.go | 44 func (m *mutatorTestModule) GenerateAndroidBuildActions(ctx ModuleContext) { 45 ctx.Build(pctx, BuildParams{ 47 Output: PathForModuleOut(ctx, "output"), 50 m.missingDeps = ctx.GetMissingDependencies() 53 func (m *mutatorTestModule) DepsMutator(ctx BottomUpMutatorContext) { 54 ctx.AddDependency(ctx.Module(), nil, m.props.Deps_missing_deps...) 57 func addMissingDependenciesMutator(ctx TopDownMutatorContext) { 58 ctx.AddMissingDependencies(ctx.Module().(*mutatorTestModule).props.Mutator_missing_deps) 73 ctx := NewTestContext() 74 ctx.SetAllowMissingDependencies(true) [all …]
|
D | paths.go | 52 func (ctx NullPathContext) Config() Config { return ctx.config } 88 func reportPathError(ctx PathContext, err error) { 89 reportPathErrorf(ctx, "%s", err.Error()) 95 func reportPathErrorf(ctx PathContext, format string, args ...interface{}) { 96 if mctx, ok := ctx.(moduleErrorf); ok { 98 } else if ectx, ok := ctx.(errorfContext); ok { 105 func pathContextName(ctx PathContext, module blueprint.Module) string { 106 if x, ok := ctx.(interface{ ModuleName(blueprint.Module) string }); ok { 108 } else if x, ok := ctx.(interface{ OtherModuleName(blueprint.Module) string }); ok { 143 genPathWithExt(ctx ModuleContext, subdir, ext string) ModuleGenPath [all …]
|
D | rule_builder_test.go | 47 ctx := pathContext() 50 Tool(PathForSource(ctx, "ld")). 52 FlagWithOutput("-o ", PathForOutput(ctx, "linked")) 73 ctx := pathContext() 76 Tool(PathForSource(ctx, "cp")). 77 Input(PathForSource(ctx, "a")). 78 Output(PathForOutput(ctx, "b")) 80 Tool(PathForSource(ctx, "cp")). 81 Input(PathForOutput(ctx, "b")). 82 Output(PathForOutput(ctx, "c")) [all …]
|
/build/soong/cc/ |
D | makevars.go | 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++") [all …]
|
D | check.go | 29 func CheckBadCompilerFlags(ctx BaseModuleContext, prop string, flags []string) { 34 ctx.PropertyErrorf(prop, "Flag `%s` must start with `-`", flag) 36 ctx.PropertyErrorf(prop, "Bad flag `%s`, use local_include_dirs or include_dirs instead", flag) 38 ctx.PropertyErrorf(prop, "Illegal flag `%s`", flag) 40 ctx.PropertyErrorf(prop, "Bad flag: `%s`, use native_coverage instead", flag) 42 if !ctx.Config().IsEnvTrue("ANDROID_TEMPORARILY_ALLOW_WEVERYTHING") { 43 ctx.PropertyErrorf(prop, "-Weverything is not allowed in Android.bp files. "+ 50 ctx.PropertyErrorf(prop, "`-include` only takes one argument: `%s`", flag) 54 ctx.PropertyErrorf(prop, "Path must not be an absolute path: %s", flag) 56 …ctx.PropertyErrorf(prop, "Path must not start with `../`: `%s`. Use include_dirs to -include from … [all …]
|
D | stl.go | 61 func (stl *stl) begin(ctx BaseModuleContext) { 67 if ctx.useSdk() && ctx.Device() { 80 ctx.ModuleErrorf("stl: %q is not a supported STL with sdk_version set", s) 83 } else if ctx.Windows() { 91 ctx.ModuleErrorf("stl: %q is not a supported STL for windows", s) 94 } else if ctx.Fuchsia() { 105 if ctx.static() { 111 ctx.ModuleErrorf("stl: %q is not a supported STL on Fuchsia", s) 125 if ctx.static() { 131 ctx.ModuleErrorf("stl: %q is not a supported STL", s) [all …]
|
D | binary.go | 62 func RegisterBinaryBuildComponents(ctx android.RegistrationContext) { 63 ctx.RegisterModuleType("cc_binary", BinaryFactory) 64 ctx.RegisterModuleType("cc_binary_host", binaryHostFactory) 116 func (binary *binaryDecorator) getStemWithoutSuffix(ctx BaseModuleContext) string { 117 stem := ctx.baseModuleName() 125 func (binary *binaryDecorator) getStem(ctx BaseModuleContext) string { 126 return binary.getStemWithoutSuffix(ctx) + String(binary.Properties.Suffix) 129 func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps { 130 deps = binary.baseLinker.linkerDeps(ctx, deps) 131 if ctx.toolchain().Bionic() { [all …]
|
/build/soong/ui/build/ |
D | build.go | 28 func SetupOutDir(ctx Context, config Config) { 29 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "Android.mk")) 30 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "CleanSpec.mk")) 32 ensureEmptyFileExists(ctx, filepath.Join(config.SoongOutDir(), ".soong.in_make")) 36 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "ninja_build")) 37 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), ".out-dir")) 42 ctx.Fatalln("Failed to write BUILD_DATETIME to file:", err) 45 ctx.Fatalln("Missing BUILD_DATETIME_FILE") 62 func createCombinedBuildNinjaFile(ctx Context, config Config) { 72 ctx.Fatalln("Failed to create combined ninja file:", err) [all …]
|
D | soong.go | 33 func runSoong(ctx Context, config Config) { 34 ctx.BeginTrace(metrics.RunSoong, "soong") 35 defer ctx.EndTrace() 38 ctx.BeginTrace(metrics.RunSoong, "blueprint bootstrap") 39 defer ctx.EndTrace() 41 cmd := Command(ctx, config, "blueprint bootstrap", "build/blueprint/bootstrap.bash", "-t", "-n") 56 ctx.BeginTrace(metrics.RunSoong, "environment check") 57 defer ctx.EndTrace() 63 cmd := Command(ctx, config, "soong_env", envTool, envFile) 70 ctx.Verboseln("soong_env failed, forcing manifest regeneration") [all …]
|
D | kati.go | 40 func genKatiSuffix(ctx Context, config Config) { 52 ctx.Verbosef("Kati ninja suffix too long: %q", katiSuffix) 53 ctx.Verbosef("Replacing with: %q", shortSuffix) 56 ctx.Println("Error writing suffix file:", err) 63 func runKati(ctx Context, config Config, extraSuffix string, args []string, envFunc func(*Environme… 97 cmd := Command(ctx, config, "ckati", executable, args...) 101 ctx.Fatalln("Error getting output pipe for ckati:", err) 112 ctx.Println("Failed to get current user:", err) 120 ctx.Println("Failed to read hostname:", err) 127 status.KatiReader(ctx.Status.StartTool(), pipe) [all …]
|
D | rbe.go | 38 func rbeCommand(ctx Context, config Config, rbeCmd string) string { 45 ctx.Fatalf("rbe command path not found") 49 ctx.Fatalf("rbe command %q not found", rbeCmd) 55 func getRBEVars(ctx Context, tmpDir string) map[string]string { 60 func startRBE(ctx Context, config Config) { 61 ctx.BeginTrace(metrics.RunSetupTool, "rbe_bootstrap") 62 defer ctx.EndTrace() 64 if u := ulimitOrFatal(ctx, config, "-u"); u < rbeLeastNProcs { 65 ctx.Fatalf("max user processes is insufficient: %d; want >= %d.\n", u, rbeLeastNProcs) 67 if n := ulimitOrFatal(ctx, config, "-n"); n < rbeLeastNFiles { [all …]
|
/build/soong/rust/ |
D | testing.go | 79 ctx := android.NewTestArchContext() 80 android.RegisterPrebuiltMutators(ctx) 81 cc.RegisterRequiredBuildComponentsForTest(ctx) 82 ctx.RegisterModuleType("genrule", genrule.GenRuleFactory) 83 ctx.RegisterModuleType("rust_binary", RustBinaryFactory) 84 ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory) 85 ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory) 86 ctx.RegisterModuleType("rust_test", RustTestFactory) 87 ctx.RegisterModuleType("rust_test_host", RustTestHostFactory) 88 ctx.RegisterModuleType("rust_library", RustLibraryFactory) [all …]
|
/build/soong/java/ |
D | sdk.go | 54 func UseApiFingerprint(ctx android.BaseModuleContext) bool { 55 if ctx.Config().UnbundledBuild() && 56 !ctx.Config().UnbundledBuildUsePrebuiltSdks() && 57 ctx.Config().IsEnvTrue("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT") { 195 func (s sdkSpec) forPdkBuild(ctx android.EarlyModuleContext) sdkSpec { 205 version := sdkVersion(LatestSdkVersionInt(ctx)) 212 func (s sdkSpec) usePrebuilt(ctx android.EarlyModuleContext) bool { 215 return ctx.Config().UnbundledBuildUsePrebuiltSdks() 232 func (s sdkSpec) effectiveVersion(ctx android.EarlyModuleContext) (sdkVersion, error) { 236 if ctx.Config().IsPdkBuild() { [all …]
|
D | hiddenapi_singleton.go | 41 func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStruct { 42 return ctx.Config().Once(hiddenAPISingletonPathsKey, func() interface{} { 44 flags: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-flags.csv"), 45 index: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-index.csv"), 46 metadata: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-greylist.csv"), 47 stubFlags: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-stub-flags.txt"), 61 func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) { 63 if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { 67 stubFlagsRule(ctx) 70 if ctx.Config().FrameworksBaseDirExists(ctx) { [all …]
|
D | dexpreopt_config.go | 29 func systemServerClasspath(ctx android.MakeVarsContext) []string { 30 return ctx.Config().OnceStringSlice(systemServerClasspathKey, func() []string { 31 global := dexpreopt.GetGlobalConfig(ctx) 33 nonUpdatable := dexpreopt.NonUpdatableSystemServerJars(ctx, global) 42 dexpreopt.GetJarLocationFromApexJarPair(ctx, m)) 57 func dexpreoptTargets(ctx android.PathContext) []android.Target { 59 for _, target := range ctx.Config().Targets[android.Android] { 65 for _, target := range ctx.Config().Targets[android.BuildOs] { 82 func getDexLocation(ctx android.PathContext, target android.Target, module string) string { 83 apex, jar := android.SplitApexJarPair(ctx, module) [all …]
|
D | app.go | 43 func RegisterAppBuildComponents(ctx android.RegistrationContext) { 44 ctx.RegisterModuleType("android_app", AndroidAppFactory) 45 ctx.RegisterModuleType("android_test", AndroidTestFactory) 46 ctx.RegisterModuleType("android_test_helper_app", AndroidTestHelperAppFactory) 47 ctx.RegisterModuleType("android_app_certificate", AndroidAppCertificateFactory) 48 ctx.RegisterModuleType("override_android_app", OverrideAndroidAppModuleFactory) 49 ctx.RegisterModuleType("override_android_test", OverrideAndroidTestModuleFactory) 50 …ctx.RegisterModuleType("override_runtime_resource_overlay", OverrideRuntimeResourceOverlayModuleFa… 51 ctx.RegisterModuleType("android_app_import", AndroidAppImportFactory) 52 ctx.RegisterModuleType("android_test_import", AndroidTestImportFactory) [all …]
|
D | dexpreopt_bootjars.go | 112 func (image bootImageConfig) moduleName(ctx android.PathContext, idx int) string { 116 _, m := android.SplitApexJarPair(ctx, image.modules[idx]) 124 func (image bootImageConfig) firstModuleNameOrStem(ctx android.PathContext) string { 126 return image.moduleName(ctx, 0) 132 func (image bootImageConfig) moduleFiles(ctx android.PathContext, dir android.OutputPath, exts ...s… 135 name := image.moduleName(ctx, i) 137 ret = append(ret, dir.Join(ctx, name+ext)) 177 func RegisterDexpreoptBootJarsComponents(ctx android.RegistrationContext) { 178 ctx.RegisterSingletonType("dex_bootjars", dexpreoptBootJarsFactory) 181 func skipDexpreoptBootJars(ctx android.PathContext) bool { [all …]
|
D | java.go | 63 func RegisterJavaBuildComponents(ctx android.RegistrationContext) { 64 ctx.RegisterModuleType("java_defaults", DefaultsFactory) 66 ctx.RegisterModuleType("java_library", LibraryFactory) 67 ctx.RegisterModuleType("java_library_static", LibraryStaticFactory) 68 ctx.RegisterModuleType("java_library_host", LibraryHostFactory) 69 ctx.RegisterModuleType("java_binary", BinaryFactory) 70 ctx.RegisterModuleType("java_binary_host", BinaryHostFactory) 71 ctx.RegisterModuleType("java_test", TestFactory) 72 ctx.RegisterModuleType("java_test_helper_library", TestHelperLibraryFactory) 73 ctx.RegisterModuleType("java_test_host", TestHostFactory) [all …]
|
/build/soong/androidmk/androidmk/ |
D | android.go | 348 func splitAndAssign(ctx variableAssignmentContext, splitFunc listSplitFunc, namesByClassification m… 349 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.ListType) 368 err = setVariable(ctx.file, ctx.append, ctx.prefix, name, component, true) 377 func localIncludeDirs(ctx variableAssignmentContext) error { 378 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "include_dirs", … 381 func exportIncludeDirs(ctx variableAssignmentContext) error { 384 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_… 387 func local32BitOnly(ctx variableAssignmentContext) error { 388 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.BoolType) 400 return setVariable(ctx.file, false, ctx.prefix, "compile_multilib", thirtyTwo, true) [all …]
|
/build/soong/tradefed/ |
D | autogen.go | 29 func getTestConfigTemplate(ctx android.ModuleContext, prop *string) android.OptionalPath { 30 return ctx.ExpandOptionalSource(prop, "test_config_template") 33 func getTestConfig(ctx android.ModuleContext, prop *string) android.Path { 34 if p := ctx.ExpandOptionalSource(prop, "test_config"); p.Valid() { 36 } else if p := android.ExistentPathForSource(ctx, ctx.ModuleDir(), "AndroidTest.xml"); p.Valid() { 47 func testConfigPath(ctx android.ModuleContext, prop *string, testSuites []string, autoGenConfig *bo… 48 p := getTestConfig(ctx, prop) 52 outputFile := android.PathForModuleOut(ctx, ctx.ModuleName()+".config") 110 func autogenTemplate(ctx android.ModuleContext, output android.WritablePath, template string, confi… 111 autogenTemplateWithNameAndOutputFile(ctx, ctx.ModuleName(), output, template, configs, "") [all …]
|
/build/soong/dexpreopt/ |
D | config.go | 158 func constructPath(ctx android.PathContext, path string) android.Path { 159 buildDirPrefix := ctx.Config().BuildDir() + "/" 163 return android.PathForOutput(ctx, strings.TrimPrefix(path, buildDirPrefix)) 165 return android.PathForSource(ctx, path) 169 func constructPaths(ctx android.PathContext, paths []string) android.Paths { 172 ret = append(ret, constructPath(ctx, path)) 177 func constructWritablePath(ctx android.PathContext, path string) android.WritablePath { 181 return constructPath(ctx, path).(android.WritablePath) 186 func ParseGlobalConfig(ctx android.PathContext, data []byte) (*GlobalConfig, error) { 203 …config.GlobalConfig.DirtyImageObjects = android.OptionalPathForPath(constructPath(ctx, config.Dirt… [all …]
|
/build/blueprint/ |
D | module_ctx_test.go | 35 func noCreateAliasMutator(name string) func(ctx BottomUpMutatorContext) { 36 return func(ctx BottomUpMutatorContext) { 37 if ctx.ModuleName() == name { 38 ctx.CreateVariations("a", "b") 43 func createAliasMutator(name string) func(ctx BottomUpMutatorContext) { 44 return func(ctx BottomUpMutatorContext) { 45 if ctx.ModuleName() == name { 46 ctx.CreateVariations("a", "b") 47 ctx.AliasVariation("b") 52 func addVariantDepsMutator(variants []Variation, tag DependencyTag, from, to string) func(ctx Botto… [all …]
|
D | context_test.go | 34 func walkDependencyGraph(ctx *Context, topModule *moduleInfo, allowDuplicates bool) (string, string… 37 ctx.walkDeps(topModule, allowDuplicates, 39 outputDown += ctx.ModuleName(dep.module.logicModule) 52 outputUp += ctx.ModuleName(dep.module.logicModule) 142 ctx := NewContext() 143 ctx.RegisterModuleType("foo_module", newFooModule) 144 ctx.RegisterModuleType("bar_module", newBarModule) 157 _, _, errs := ctx.parseOne(".", "Blueprint", r, parser.NewScope(nil), nil) 166 _, errs = ctx.ResolveDependencies(nil) 182 ctx := NewContext() [all …]
|