Home
last modified time | relevance | path

Searched refs:ctx (Results 1 – 25 of 374) sorted by relevance

12345678910>>...15

/build/soong/java/config/
Dmakevars.go27 func makeVarsProvider(ctx android.MakeVarsContext) {
28 ctx.Strict("FRAMEWORK_LIBRARIES", strings.Join(FrameworkLibraries, " "))
31ctx.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 …]
/build/soong/android/
Dmutator_test.go42 func (m *mutatorTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
43 ctx.Build(pctx, BuildParams{
45 Output: PathForModuleOut(ctx, "output"),
48 m.missingDeps = ctx.GetMissingDependencies()
51 func (m *mutatorTestModule) DepsMutator(ctx BottomUpMutatorContext) {
52 ctx.AddDependency(ctx.Module(), nil, m.props.Deps_missing_deps...)
55 func addMissingDependenciesMutator(ctx TopDownMutatorContext) {
56 ctx.AddMissingDependencies(ctx.Module().(*mutatorTestModule).props.Mutator_missing_deps)
70 FixtureRegisterWithContext(func(ctx RegistrationContext) {
71 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
[all …]
Drule_builder_test.go48 ctx := builderContext()
50 rule := NewRuleBuilder(pctx, ctx)
53 Tool(PathForSource(ctx, "ld")).
55 FlagWithOutput("-o ", PathForOutput(ctx, "linked"))
74 ctx := builderContext()
76 rule := NewRuleBuilder(pctx, ctx)
79 Tool(PathForSource(ctx, "ln")).
81 SymlinkOutput(PathForOutput(ctx, "a"))
83 ImplicitSymlinkOutput(PathForOutput(ctx, "b"))
100 ctx := builderContext()
[all …]
Dimage.go20 ImageMutatorBegin(ctx BaseModuleContext)
23 CoreVariantNeeded(ctx BaseModuleContext) bool
27 RamdiskVariantNeeded(ctx BaseModuleContext) bool
31 VendorRamdiskVariantNeeded(ctx BaseModuleContext) bool
35 DebugRamdiskVariantNeeded(ctx BaseModuleContext) bool
39 RecoveryVariantNeeded(ctx BaseModuleContext) bool
44 ExtraImageVariations(ctx BaseModuleContext) []string
50 SetImageVariation(ctx BaseModuleContext, variation string, module Module)
74 func imageMutator(ctx BottomUpMutatorContext) {
75 if ctx.Os() != Android {
[all …]
Dpaths.go53 func (ctx NullPathContext) Config() Config { return ctx.config }
69 func Glob(ctx EarlyModulePathContext, globPattern string, excludes []string) Paths {
70 ret, err := ctx.GlobWithDeps(globPattern, excludes)
72 ctx.ModuleErrorf("glob: %s", err.Error())
74 return pathsForModuleSrcFromFullPath(ctx, ret, true)
79 func GlobFiles(ctx EarlyModulePathContext, globPattern string, excludes []string) Paths {
80 ret, err := ctx.GlobWithDeps(globPattern, excludes)
82 ctx.ModuleErrorf("glob: %s", err.Error())
84 return pathsForModuleSrcFromFullPath(ctx, ret, false)
138 func reportPathError(ctx PathContext, err error) {
[all …]
/build/soong/dexpreopt/
Dclass_loader_context_test.go50 ctx := testContext()
54 m.AddContext(ctx, AnySdkVersion, "a", buildPath(ctx, "a"), installPath(ctx, "a"), nil)
55 m.AddContext(ctx, AnySdkVersion, "b", buildPath(ctx, "b"), installPath(ctx, "b"), nil)
56 m.AddContext(ctx, AnySdkVersion, "c", buildPath(ctx, "c"), installPath(ctx, "c"), nil)
61 m1.AddContext(ctx, AnySdkVersion, "a1", buildPath(ctx, "a1"), installPath(ctx, "a1"), nil)
62 m1.AddContext(ctx, AnySdkVersion, "b1", buildPath(ctx, "b1"), installPath(ctx, "b1"), nil)
65 m2.AddContext(ctx, AnySdkVersion, "a2", buildPath(ctx, "a2"), installPath(ctx, "a2"), nil)
66 m2.AddContext(ctx, AnySdkVersion, "b2", buildPath(ctx, "b2"), installPath(ctx, "b2"), nil)
67 m2.AddContext(ctx, AnySdkVersion, "c2", buildPath(ctx, "c2"), installPath(ctx, "c2"), m1)
70 m3.AddContext(ctx, AnySdkVersion, "a3", buildPath(ctx, "a3"), installPath(ctx, "a3"), nil)
[all …]
/build/soong/cc/
Dmakevars.go43 func makeStringOfKeys(ctx android.MakeVarsContext, key android.OnceKey) string {
44 set := getNamedMapForConfig(ctx.Config(), key)
73 func makeVarsProvider(ctx android.MakeVarsContext) {
74 ctx.Strict("LLVM_RELEASE_VERSION", "${config.ClangShortVersion}")
75 ctx.Strict("LLVM_PREBUILTS_VERSION", "${config.ClangVersion}")
76 ctx.Strict("LLVM_PREBUILTS_BASE", "${config.ClangBase}")
77 ctx.Strict("LLVM_PREBUILTS_PATH", "${config.ClangBin}")
78 ctx.Strict("CLANG", "${config.ClangBin}/clang")
79 ctx.Strict("CLANG_CXX", "${config.ClangBin}/clang++")
80 ctx.Strict("LLVM_AS", "${config.ClangBin}/llvm-as")
[all …]
Dcheck.go29 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 ctx.PropertyErrorf(prop, "Bad flag: `%s`, use whole_program_vtables instead", flag)
44 if !ctx.Config().IsEnvTrue("ANDROID_TEMPORARILY_ALLOW_WEVERYTHING") {
45 ctx.PropertyErrorf(prop, "-Weverything is not allowed in Android.bp files. "+
52 ctx.PropertyErrorf(prop, "`-include` only takes one argument: `%s`", flag)
56 ctx.PropertyErrorf(prop, "Path must not be an absolute path: %s", flag)
[all …]
Dgenrule.go56 func (g *GenruleExtraProperties) ImageMutatorBegin(ctx android.BaseModuleContext) {}
58 func (g *GenruleExtraProperties) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
59 if ctx.DeviceConfig().VndkVersion() == "" {
63 if ctx.DeviceConfig().ProductVndkVersion() != "" && ctx.ProductSpecific() {
67 return !(ctx.SocSpecific() || ctx.DeviceSpecific())
70 func (g *GenruleExtraProperties) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
74 func (g *GenruleExtraProperties) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
78 func (g *GenruleExtraProperties) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
82 func (g *GenruleExtraProperties) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
85 recoverySnapshotVersion := ctx.DeviceConfig().RecoverySnapshotVersion()
[all …]
Dbinary.go63 func RegisterBinaryBuildComponents(ctx android.RegistrationContext) {
64 ctx.RegisterModuleType("cc_binary", BinaryFactory)
65 ctx.RegisterModuleType("cc_binary_host", binaryHostFactory)
130 func (binary *binaryDecorator) getStemWithoutSuffix(ctx BaseModuleContext) string {
131 stem := ctx.baseModuleName()
141 func (binary *binaryDecorator) getStem(ctx BaseModuleContext) string {
142 return binary.getStemWithoutSuffix(ctx) + String(binary.Properties.Suffix)
147 func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
148 deps = binary.baseLinker.linkerDeps(ctx, deps)
149 if ctx.toolchain().Bionic() {
[all …]
Dstl.go60 func (stl *stl) begin(ctx BaseModuleContext) {
65 } else if ctx.header() {
68 if ctx.useSdk() && ctx.Device() {
81 ctx.ModuleErrorf("stl: %q is not a supported STL with sdk_version set", s)
84 } else if ctx.Windows() {
92 ctx.ModuleErrorf("stl: %q is not a supported STL for windows", s)
95 } else if ctx.Fuchsia() {
106 if ctx.static() {
112 ctx.ModuleErrorf("stl: %q is not a supported STL on Fuchsia", s)
126 if ctx.static() {
[all …]
/build/soong/java/
Dplatform_bootclasspath.go28 func registerPlatformBootclasspathBuildComponents(ctx android.RegistrationContext) {
29 ctx.RegisterSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
104 func (b *platformBootclasspathModule) DepsMutator(ctx android.BottomUpMutatorContext) {
105 b.hiddenAPIDepsMutator(ctx)
107 if SkipDexpreoptBootJars(ctx) {
113 dexpreopt.RegisterToolDeps(ctx)
116 func (b *platformBootclasspathModule) hiddenAPIDepsMutator(ctx android.BottomUpMutatorContext) {
117 if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
122 apiLevelToStubLibModules := hiddenAPIComputeMonolithicStubLibModules(ctx.Config())
123 hiddenAPIAddStubLibDependencies(ctx, apiLevelToStubLibModules)
[all …]
Dsdk.go40 func UseApiFingerprint(ctx android.BaseModuleContext) bool {
41 if ctx.Config().UnbundledBuild() &&
42 !ctx.Config().AlwaysUsePrebuiltSdks() &&
43 ctx.Config().IsEnvTrue("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT") {
49 func defaultJavaLanguageVersion(ctx android.EarlyModuleContext, s android.SdkSpec) javaVersion {
50 sdk, err := s.EffectiveVersion(ctx)
52 ctx.PropertyErrorf("sdk_version", "%s", err)
63 func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext android.SdkContext) sdkDep {
64 sdkVersion := sdkContext.SdkVersion(ctx)
66 ctx.PropertyErrorf("sdk_version", "invalid version %q", sdkVersion.Raw)
[all …]
Dhiddenapi_singleton.go27 func RegisterHiddenApiSingletonComponents(ctx android.RegistrationContext) {
28 ctx.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
100 func hiddenAPISingletonPaths(ctx android.PathContext) hiddenAPISingletonPathsStruct {
101 return ctx.Config().Once(hiddenAPISingletonPathsKey, func() interface{} {
105 hiddenapiDir := android.PathForOutput(ctx, "hiddenapi")
107 flags: hiddenapiDir.Join(ctx, "hiddenapi-flags.csv"),
108 index: hiddenapiDir.Join(ctx, "hiddenapi-index.csv"),
109 metadata: hiddenapiDir.Join(ctx, "hiddenapi-unsupported.csv"),
110 stubFlags: hiddenapiDir.Join(ctx, "hiddenapi-stub-flags.txt"),
123 func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) {
[all …]
Dapp.go38 func RegisterAppBuildComponents(ctx android.RegistrationContext) {
39 ctx.RegisterModuleType("android_app", AndroidAppFactory)
40 ctx.RegisterModuleType("android_test", AndroidTestFactory)
41 ctx.RegisterModuleType("android_test_helper_app", AndroidTestHelperAppFactory)
42 ctx.RegisterModuleType("android_app_certificate", AndroidAppCertificateFactory)
43 ctx.RegisterModuleType("override_android_app", OverrideAndroidAppModuleFactory)
44 ctx.RegisterModuleType("override_android_test", OverrideAndroidTestModuleFactory)
213 func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
214 a.Module.deps(ctx)
216 if String(a.appProperties.Stl) == "c++_shared" && !a.SdkVersion(ctx).Specified() {
[all …]
Ddexpreopt.go24 dexpreoptDisabled(ctx android.BaseModuleContext) bool
77 func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
78 global := dexpreopt.GetGlobalConfig(ctx)
84 if inList(ctx.ModuleName(), global.DisablePreoptModules) {
96 if !ctx.Module().(dexpreopterInterface).IsInstallable() {
100 if ctx.Host() {
105 …if apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo); !apexInfo.IsForPlatform(…
114 func dexpreoptToolDepsMutator(ctx android.BottomUpMutatorContext) {
115 if d, ok := ctx.Module().(dexpreopterInterface); !ok || d.dexpreoptDisabled(ctx) {
118 dexpreopt.RegisterToolDeps(ctx)
[all …]
Dlint.go181 func (l *linter) deps(ctx android.BottomUpMutatorContext) {
188 if checkOnly := ctx.Config().Getenv("ANDROID_LINT_CHECK"); checkOnly != "" {
189 …if checkOnlyModules := ctx.Config().Getenv("ANDROID_LINT_CHECK_EXTRA_MODULES"); checkOnlyModules !…
194 ctx.AddFarVariationDependencies(ctx.Config().BuildOSCommonTarget.Variations(),
208 func lintRBEExecStrategy(ctx android.ModuleContext) string {
209 return ctx.Config().GetenvWithDefault("RBE_LINT_EXEC_STRATEGY", remoteexec.LocalExecStrategy)
212 func (l *linter) writeLintProjectXML(ctx android.ModuleContext, rule *android.RuleBuilder) lintPath…
213 projectXMLPath := android.PathForModuleOut(ctx, "lint", "project.xml")
215 configXMLPath := android.PathForModuleOut(ctx, "lint", "lint.xml")
216 cacheDir := android.PathForModuleOut(ctx, "lint", "cache")
[all …]
/build/soong/ui/build/
Dbuild.go28 func SetupOutDir(ctx Context, config Config) {
29 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "Android.mk"))
30 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "CleanSpec.mk"))
39 ensureEmptyFileExists(ctx, filepath.Join(config.SoongOutDir(), ".soong.kati_enabled"))
43 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "ninja_build"))
44 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), ".out-dir"))
49 ctx.Fatalln("Failed to write BUILD_DATETIME to file:", err)
52 ctx.Fatalln("Missing BUILD_DATETIME_FILE")
69 func createCombinedBuildNinjaFile(ctx Context, config Config) {
79 ctx.Fatalln("Failed to create combined ninja file:", err)
[all …]
Drbe.go41 func rbeCommand(ctx Context, config Config, rbeCmd string) string {
46 ctx.Fatalf("rbe command path not found")
50 ctx.Fatalf("rbe command %q not found", rbeCmd)
74 func getRBEVars(ctx Context, config Config) map[string]string {
83 name, err := sockAddr(absPath(ctx, config.TempDir()))
85 ctx.Fatalf("Error retrieving socket address: %v", err)
95 func startRBE(ctx Context, config Config) {
96 ctx.BeginTrace(metrics.RunSetupTool, "rbe_bootstrap")
97 defer ctx.EndTrace()
99 if u := ulimitOrFatal(ctx, config, "-u"); u < rbeLeastNProcs {
[all …]
/build/blueprint/
Dmodule_ctx_test.go35 func noAliasMutator(name string) func(ctx BottomUpMutatorContext) {
36 return func(ctx BottomUpMutatorContext) {
37 if ctx.ModuleName() == name {
38 ctx.CreateVariations("a", "b")
43 func aliasMutator(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 createAliasMutator(name string) func(ctx BottomUpMutatorContext) {
[all …]
Dprovider_test.go54 func (p *providerTestModule) GenerateBuildActions(ctx ModuleContext) {
55 unset := ctx.Provider(providerTestUnsetInfoProvider).(providerTestUnsetInfo)
61 _ = ctx.Provider(providerTestUnusedMutatorProvider)
63ctx.SetProvider(providerTestGenerateBuildActionsInfoProvider, &providerTestGenerateBuildActionsInf…
64 Value: ctx.ModuleName(),
67 mp := ctx.Provider(providerTestMutatorInfoProvider).(*providerTestMutatorInfo)
72 ctx.VisitDirectDeps(func(module Module) {
73 …gbap := ctx.OtherModuleProvider(module, providerTestGenerateBuildActionsInfoProvider).(*providerTe…
80 func providerTestDepsMutator(ctx BottomUpMutatorContext) {
81 if p, ok := ctx.Module().(*providerTestModule); ok {
[all …]
/build/soong/androidmk/androidmk/
Dandroid.go352 func splitAndAssign(ctx variableAssignmentContext, splitFunc listSplitFunc, namesByClassification m…
353 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.ListType)
372 err = setVariable(ctx.file, ctx.append, ctx.prefix, name, component, true)
381 func localIncludeDirs(ctx variableAssignmentContext) error {
382 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "include_dirs", …
385 func exportIncludeDirs(ctx variableAssignmentContext) error {
388 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_…
391 func local32BitOnly(ctx variableAssignmentContext) error {
392 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.BoolType)
404 return setVariable(ctx.file, false, ctx.prefix, "compile_multilib", thirtyTwo, true)
[all …]
/build/soong/tradefed/
Dautogen.go29 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, "", testIns…
[all …]
Dmakevars.go25 func makeVarsProvider(ctx android.MakeVarsContext) {
26 ctx.Strict("AUTOGEN_TEST_CONFIG_SCRIPT", "${AutoGenTestConfigScript}")
27 ctx.Strict("INSTRUMENTATION_TEST_CONFIG_TEMPLATE", "${InstrumentationTestConfigTemplate}")
28 ctx.Strict("JAVA_HOST_TEST_CONFIG_TEMPLATE", "${JavaHostTestConfigTemplate}")
29 ctx.Strict("JAVA_TEST_CONFIG_TEMPLATE", "${JavaTestConfigTemplate}")
30 ctx.Strict("NATIVE_BENCHMARK_TEST_CONFIG_TEMPLATE", "${NativeBenchmarkTestConfigTemplate}")
31 ctx.Strict("NATIVE_HOST_TEST_CONFIG_TEMPLATE", "${NativeHostTestConfigTemplate}")
32 ctx.Strict("NATIVE_TEST_CONFIG_TEMPLATE", "${NativeTestConfigTemplate}")
33 ctx.Strict("PYTHON_BINARY_HOST_TEST_CONFIG_TEMPLATE", "${PythonBinaryHostTestConfigTemplate}")
34 ctx.Strict("RUST_DEVICE_TEST_CONFIG_TEMPLATE", "${RustDeviceTestConfigTemplate}")
[all …]
/build/soong/rust/
Dtesting.go208 func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
209 ctx.RegisterModuleType("rust_benchmark", RustBenchmarkFactory)
210 ctx.RegisterModuleType("rust_benchmark_host", RustBenchmarkHostFactory)
211 ctx.RegisterModuleType("rust_binary", RustBinaryFactory)
212 ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory)
213 ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory)
214 ctx.RegisterModuleType("rust_bindgen_host", RustBindgenHostFactory)
215 ctx.RegisterModuleType("rust_test", RustTestFactory)
216 ctx.RegisterModuleType("rust_test_host", RustTestHostFactory)
217 ctx.RegisterModuleType("rust_library", RustLibraryFactory)
[all …]

12345678910>>...15