/build/soong/java/config/ |
D | makevars.go | 27 func makeVarsProvider(ctx android.MakeVarsContext) { 28 ctx.Strict("TARGET_DEFAULT_JAVA_LIBRARIES", strings.Join(DefaultLibraries, " ")) 29 …ctx.Strict("TARGET_DEFAULT_BOOTCLASSPATH_LIBRARIES", strings.Join(DefaultBootclasspathLibraries, "… 30 ctx.Strict("DEFAULT_SYSTEM_MODULES", DefaultSystemModules) 32 if ctx.Config().TargetOpenJDK9() { 33 ctx.Strict("DEFAULT_JAVA_LANGUAGE_VERSION", "1.9") 35 ctx.Strict("DEFAULT_JAVA_LANGUAGE_VERSION", "1.8") 38 ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}") 39 ctx.Strict("ANDROID_JAVA8_HOME", "prebuilts/jdk/jdk8/${hostPrebuiltTag}") 40 ctx.Strict("ANDROID_JAVA9_HOME", "prebuilts/jdk/jdk9/${hostPrebuiltTag}") [all …]
|
/build/soong/cc/ |
D | makevars.go | 43 func makeStringOfKeys(ctx android.MakeVarsContext, key android.OnceKey) string { 44 set := getNamedMapForConfig(ctx.Config(), key) 66 func makeVarsProvider(ctx android.MakeVarsContext) { 67 ctx.Strict("LLVM_RELEASE_VERSION", "${config.ClangShortVersion}") 68 ctx.Strict("LLVM_PREBUILTS_VERSION", "${config.ClangVersion}") 69 ctx.Strict("LLVM_PREBUILTS_BASE", "${config.ClangBase}") 70 ctx.Strict("LLVM_PREBUILTS_PATH", "${config.ClangBin}") 71 ctx.Strict("CLANG", "${config.ClangBin}/clang") 72 ctx.Strict("CLANG_CXX", "${config.ClangBin}/clang++") 73 ctx.Strict("LLVM_AS", "${config.ClangBin}/llvm-as") [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) 45 ctx.PropertyErrorf(prop, "`-include` only takes one argument: `%s`", flag) 49 ctx.PropertyErrorf(prop, "Path must not be an absolute path: %s", flag) 51 …ctx.PropertyErrorf(prop, "Path must not start with `../`: `%s`. Use include_dirs to -include from … 59 …ctx.PropertyErrorf(prop, "Bad flag: `%s` is not an allowed multi-word flag. Should it be split int… 67 func CheckBadLinkerFlags(ctx BaseModuleContext, prop string, flags []string) { [all …]
|
D | binary.go | 109 func (binary *binaryDecorator) getStem(ctx BaseModuleContext) string { 110 stem := ctx.baseModuleName() 118 func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps { 119 deps = binary.baseLinker.linkerDeps(ctx, deps) 120 if ctx.toolchain().Bionic() { 122 if !ctx.useSdk() { 134 version := ctx.sdkVersion() 136 version = getCurrentNdkPrebuiltVersion(ctx) 153 if ctx.selectedStl() == "libc++_static" { 165 if ctx.Os() == android.LinuxBionic && !binary.static() { [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) 121 if ctx.static() { 127 ctx.ModuleErrorf("stl: %q is not a supported STL", s) [all …]
|
D | ndk_headers.go | 51 func getCurrentIncludePath(ctx android.ModuleContext) android.OutputPath { 52 return getNdkSysrootBase(ctx).Join(ctx, "usr/include") 96 func getHeaderInstallDir(ctx android.ModuleContext, header android.Path, from string, 109 fullFromPath := android.PathForModuleSrc(ctx, from) 117 ctx.ModuleErrorf("filepath.Rel(%q, %q) failed: %s", headerDir, 122 installDir := getCurrentIncludePath(ctx).Join(ctx, to, strippedHeaderDir) 128 func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { 130 ctx.PropertyErrorf("license", "field is required") 133 m.licensePath = android.PathForModuleSrc(ctx, String(m.properties.License)) 139 if ctx.Config().NdkAbis() && strings.Contains(ctx.ModuleName(), "mips") { [all …]
|
/build/soong/android/ |
D | rule_builder_test.go | 45 ctx := pathContext() 48 Tool(PathForSource(ctx, "ld")). 50 FlagWithOutput("-o ", PathForOutput(ctx, "linked")) 71 ctx := pathContext() 74 Tool(PathForSource(ctx, "cp")). 75 Input(PathForSource(ctx, "a")). 76 Output(PathForOutput(ctx, "b")) 78 Tool(PathForSource(ctx, "cp")). 79 Input(PathForOutput(ctx, "b")). 80 Output(PathForOutput(ctx, "c")) [all …]
|
D | paths.go | 74 func reportPathError(ctx PathContext, err error) { 75 reportPathErrorf(ctx, "%s", err.Error()) 81 func reportPathErrorf(ctx PathContext, format string, args ...interface{}) { 82 if mctx, ok := ctx.(moduleErrorf); ok { 84 } else if ectx, ok := ctx.(errorfContext); ok { 117 genPathWithExt(ctx ModuleContext, subdir, ext string) ModuleGenPath 120 objPathWithExt(ctx ModuleContext, subdir, ext string) ModuleObjPath 123 resPathWithName(ctx ModuleContext, name string) ModuleResPath 128 func GenPathWithExt(ctx ModuleContext, subdir string, p Path, ext string) ModuleGenPath { 130 return path.genPathWithExt(ctx, subdir, ext) [all …]
|
D | package_ctx.go | 82 ctx := &configErrorWrapper{p, config.(Config), nil} 83 ret := f(ctx) 84 if len(ctx.errors) > 0 { 85 return "", ctx.errors[0] 97 ctx := &configErrorWrapper{p, config.(Config), nil} 98 params := f(ctx) 99 if len(ctx.errors) > 0 { 100 return params, ctx.errors[0] 112 ctx := &configErrorWrapper{p, config.(Config), nil} 113 params := f(ctx) [all …]
|
D | namespace_test.go | 29 ctx := setupTest(t, 45 a := getModule(ctx, "a") 46 b := getModule(ctx, "b") 47 if !dependsOn(ctx, b, a) { 53 ctx := setupTest(t, 67 a := getModule(ctx, "a") 68 b := getModule(ctx, "b") 69 if !dependsOn(ctx, b, a) { 97 ctx := setupTest(t, 118 a := getModule(ctx, "a") [all …]
|
D | prebuilt.go | 53 func (p *Prebuilt) SingleSourcePath(ctx ModuleContext) Path { 56 ctx.PropertyErrorf("srcs", "missing prebuilt source file") 61 ctx.PropertyErrorf("srcs", "multiple prebuilt source files") 67 return PathForModuleSrc(ctx, (*p.srcs)[0]) 70 ctx.PropertyErrorf("src", "missing prebuilt source file") 73 return PathForModuleSrc(ctx, *p.src) 98 func RegisterPrebuiltsPreArchMutators(ctx RegisterMutatorsContext) { 99 ctx.BottomUp("prebuilts", PrebuiltMutator).Parallel() 102 func RegisterPrebuiltsPostDepsMutators(ctx RegisterMutatorsContext) { 103 ctx.TopDown("prebuilt_select", PrebuiltSelectModuleMutator).Parallel() [all …]
|
/build/soong/ui/build/ |
D | build.go | 26 func SetupOutDir(ctx Context, config Config) { 27 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "Android.mk")) 28 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "CleanSpec.mk")) 30 ensureEmptyFileExists(ctx, filepath.Join(config.SoongOutDir(), ".soong.in_make")) 34 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "ninja_build")) 35 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), ".out-dir")) 49 func createCombinedBuildNinjaFile(ctx Context, config Config) { 59 ctx.Fatalln("Failed to create combined ninja file:", err) 64 ctx.Fatalln("Failed to write combined ninja file:", err) 78 func checkProblematicFiles(ctx Context) { [all …]
|
/build/soong/java/ |
D | sdk.go | 49 func sdkVersionOrDefault(ctx android.BaseContext, v string) string { 52 return ctx.Config().DefaultAppTargetSdk() 60 func sdkVersionToNumber(ctx android.BaseContext, v string) (int, error) { 63 return ctx.Config().DefaultAppTargetSdkInt(), nil 74 func sdkVersionToNumberAsString(ctx android.BaseContext, v string) (string, error) { 75 n, err := sdkVersionToNumber(ctx, v) 82 func decodeSdkDep(ctx android.BaseContext, sdkContext sdkContext) sdkDep { 85 if ctx.Config().IsPdkBuild() && (v == "" || v == "current") { 86 sdkVersions := ctx.Config().Get(sdkVersionsKey).([]int) 94 numericSdkVersion, err := sdkVersionToNumber(ctx, v) [all …]
|
D | dexpreopt_config.go | 27 func dexpreoptGlobalConfig(ctx android.PathContext) dexpreopt.GlobalConfig { 28 return ctx.Config().Once(dexpreoptGlobalConfigKey, func() interface{} { 29 if f := ctx.Config().DexpreoptGlobalConfig(); f != "" { 30 ctx.AddNinjaFileDeps(f) 31 globalConfig, err := dexpreopt.LoadGlobalConfig(ctx, f) 39 return ctx.Config().Once(dexpreoptTestGlobalConfigKey, func() interface{} { 60 func systemServerClasspath(ctx android.PathContext) []string { 61 return ctx.Config().OnceStringSlice(systemServerClasspathKey, func() []string { 62 global := dexpreoptGlobalConfig(ctx) 78 func defaultBootImageConfig(ctx android.PathContext) bootImageConfig { [all …]
|
D | hiddenapi_singleton.go | 36 func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStruct { 37 return ctx.Config().Once(hiddenAPISingletonPathsKey, func() interface{} { 39 stubFlags: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-stub-flags.txt"), 40 flags: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-flags.csv"), 41 metadata: android.PathForOutput(ctx, "hiddenapi", "hiddenapi-greylist.csv"), 55 func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) { 57 if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { 61 stubFlagsRule(ctx) 64 if ctx.Config().FrameworksBaseDirExists(ctx) { 65 h.flags = flagsRule(ctx) [all …]
|
D | app.go | 134 func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) { 135 a.Module.deps(ctx) 138 a.aapt.deps(ctx, sdkContext(a)) 141 for _, jniTarget := range ctx.MultiTargets() { 149 ctx.AddFarVariationDependencies(variation, tag, a.appProperties.Jni_libs...) 152 cert := android.SrcIsModule(a.getCertString(ctx)) 154 ctx.AddDependency(ctx.Module(), certificateTag, cert) 160 ctx.AddDependency(ctx.Module(), certificateTag, cert) 162 ctx.PropertyErrorf("additional_certificates", 168 func (a *AndroidApp) GenerateAndroidBuildActions(ctx android.ModuleContext) { [all …]
|
D | java_test.go | 63 ctx := android.NewTestArchContext() 64 ctx.RegisterModuleType("android_app", android.ModuleFactoryAdaptor(AndroidAppFactory)) 65 …ctx.RegisterModuleType("android_app_certificate", android.ModuleFactoryAdaptor(AndroidAppCertifica… 66 ctx.RegisterModuleType("android_library", android.ModuleFactoryAdaptor(AndroidLibraryFactory)) 67 ctx.RegisterModuleType("android_test", android.ModuleFactoryAdaptor(AndroidTestFactory)) 68 …ctx.RegisterModuleType("android_test_helper_app", android.ModuleFactoryAdaptor(AndroidTestHelperAp… 69 ctx.RegisterModuleType("java_binary", android.ModuleFactoryAdaptor(BinaryFactory)) 70 ctx.RegisterModuleType("java_binary_host", android.ModuleFactoryAdaptor(BinaryHostFactory)) 71 ctx.RegisterModuleType("java_device_for_host", android.ModuleFactoryAdaptor(DeviceForHostFactory)) 72 ctx.RegisterModuleType("java_host_for_device", android.ModuleFactoryAdaptor(HostForDeviceFactory)) [all …]
|
D | java.go | 368 SdkHeaderJars(ctx android.BaseContext, sdkVersion string) android.Paths 369 SdkImplementationJars(ctx android.BaseContext, sdkVersion string) android.Paths 435 func (j *Module) shouldInstrument(ctx android.BaseContext) bool { 436 return j.properties.Instrument && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT") 439 func (j *Module) shouldInstrumentStatic(ctx android.BaseContext) bool { 440 return j.shouldInstrument(ctx) && 441 (ctx.Config().IsEnvTrue("EMMA_INSTRUMENT_STATIC") || 442 ctx.Config().UnbundledBuild()) 463 func (j *Module) deps(ctx android.BottomUpMutatorContext) { 464 if ctx.Device() { [all …]
|
D | dexpreopt.go | 58 func (d *dexpreopter) dexpreoptDisabled(ctx android.ModuleContext) bool { 59 global := dexpreoptGlobalConfig(ctx) 65 if inList(ctx.ModuleName(), global.DisablePreoptModules) { 69 if ctx.Config().UnbundledBuild() { 90 func odexOnSystemOther(ctx android.ModuleContext, installPath android.OutputPath) bool { 91 …opt.OdexOnSystemOtherByName(ctx.ModuleName(), android.InstallPathToOnDevicePath(ctx, installPath),… 94 func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.ModuleOutPath) androi… 95 if d.dexpreoptDisabled(ctx) { 99 global := dexpreoptGlobalConfig(ctx) 100 bootImage := defaultBootImageConfig(ctx) [all …]
|
/build/soong/androidmk/cmd/androidmk/ |
D | android.go | 345 func splitAndAssign(ctx variableAssignmentContext, splitFunc listSplitFunc, namesByClassification m… 346 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.ListType) 359 err = setVariable(ctx.file, ctx.append, ctx.prefix, name, component, true) 368 func localIncludeDirs(ctx variableAssignmentContext) error { 369 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "include_dirs", … 372 func exportIncludeDirs(ctx variableAssignmentContext) error { 375 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_… 378 func local32BitOnly(ctx variableAssignmentContext) error { 379 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.BoolType) 387 setVariable(ctx.file, false, ctx.prefix, "compile_multilib", thirtyTwo, true) [all …]
|
/build/soong/tradefed/ |
D | autogen.go | 28 func getTestConfigTemplate(ctx android.ModuleContext, prop *string) android.OptionalPath { 29 return ctx.ExpandOptionalSource(prop, "test_config_template") 32 func getTestConfig(ctx android.ModuleContext, prop *string) android.Path { 33 if p := ctx.ExpandOptionalSource(prop, "test_config"); p.Valid() { 35 } else if p := android.ExistentPathForSource(ctx, ctx.ModuleDir(), "AndroidTest.xml"); p.Valid() { 46 func testConfigPath(ctx android.ModuleContext, prop *string, testSuites []string) (path android.Pat… 47 if p := getTestConfig(ctx, prop); p != nil { 50 outputFile := android.PathForModuleOut(ctx, ctx.ModuleName()+".config") 60 func autogenTemplate(ctx android.ModuleContext, output android.WritablePath, template string, optio… 72 ctx.Build(pctx, android.BuildParams{ [all …]
|
/build/soong/sysprop/ |
D | sysprop_test.go | 58 ctx := android.NewTestArchContext() 59 ctx.RegisterModuleType("android_app", android.ModuleFactoryAdaptor(java.AndroidAppFactory)) 60 …ctx.RegisterModuleType("droiddoc_template", android.ModuleFactoryAdaptor(java.ExportedDroiddocDirF… 61 ctx.RegisterModuleType("java_library", android.ModuleFactoryAdaptor(java.LibraryFactory)) 62 …ctx.RegisterModuleType("java_system_modules", android.ModuleFactoryAdaptor(java.SystemModulesFacto… 63 ctx.RegisterModuleType("prebuilt_apis", android.ModuleFactoryAdaptor(java.PrebuiltApisFactory)) 64 ctx.PreArchMutators(func(ctx android.RegisterMutatorsContext) { 65 ctx.TopDown("load_hooks", android.LoadHookMutator).Parallel() 67 ctx.PreArchMutators(android.RegisterPrebuiltsPreArchMutators) 68 ctx.PreArchMutators(android.RegisterPrebuiltsPostDepsMutators) [all …]
|
/build/blueprint/ |
D | visit_test.go | 47 func visitDepsMutator(ctx BottomUpMutatorContext) { 48 if m, ok := ctx.Module().(*visitModule); ok { 49 ctx.AddDependency(ctx.Module(), visitTagDep, m.properties.Visit...) 53 func visitMutator(ctx TopDownMutatorContext) { 54 if m, ok := ctx.Module().(*visitModule); ok { 55 ctx.VisitDepsDepthFirst(func(dep Module) { 56 if ctx.OtherModuleDependencyTag(dep) != visitTagDep { 57 panic(fmt.Errorf("unexpected dependency tag on %q", ctx.OtherModuleName(dep))) 59 m.properties.VisitDepsDepthFirst = m.properties.VisitDepsDepthFirst + ctx.OtherModuleName(dep) 61 ctx.VisitDepsDepthFirstIf(func(dep Module) bool { [all …]
|
D | context_test.go | 50 func (f *fooModule) DynamicDependencies(ctx DynamicDependerModuleContext) []string { 75 func (b *barModule) DynamicDependencies(ctx DynamicDependerModuleContext) []string { 91 ctx := NewContext() 92 ctx.RegisterModuleType("foo_module", newFooModule) 93 ctx.RegisterModuleType("bar_module", newBarModule) 106 _, _, errs := ctx.parseOne(".", "Blueprint", r, parser.NewScope(nil), nil) 115 _, errs = ctx.ResolveDependencies(nil) 131 ctx := NewContext() 132 ctx.MockFileSystem(map[string][]byte{ 169 ctx.RegisterModuleType("foo_module", newFooModule) [all …]
|
/build/soong/dexpreopt/ |
D | dexpreopt_test.go | 24 func testModuleConfig(ctx android.PathContext) ModuleConfig { 28 BuildPath: android.PathForOutput(ctx, "test/test.apk"), 29 DexPath: android.PathForOutput(ctx, "test/dex/test.jar"), 48 StripInputPath: android.PathForOutput(ctx, "unstripped/test.apk"), 49 StripOutputPath: android.PathForOutput(ctx, "stripped/test.apk"), 54 ctx := android.PathContextForTesting(android.TestConfig("out", nil), nil) 55 global, module := GlobalConfigForTests(ctx), testModuleConfig(ctx) 57 rule, err := GenerateDexpreoptRule(ctx, global, module) 63 {android.PathForOutput(ctx, "test/oat/arm/package.odex"), "/system/app/test/oat/arm/test.odex"}, 64 {android.PathForOutput(ctx, "test/oat/arm/package.vdex"), "/system/app/test/oat/arm/test.vdex"}, [all …]
|