Home
last modified time | relevance | path

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

12345678910>>...26

/build/soong/java/config/
Dmakevars.go27 func makeVarsProvider(ctx android.MakeVarsContext) {
28 ctx.Strict("FRAMEWORK_LIBRARIES", strings.Join(FrameworkLibraries, " "))
31 ctx.Strict("LEGACY_CORE_PLATFORM_BOOTCLASSPATH_LIBRARIES",
33 ctx.Strict("LEGACY_CORE_PLATFORM_SYSTEM_MODULES", LegacyCorePlatformSystemModules)
35 ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}")
36 ctx.Strict("ANDROID_JAVA8_HOME", "prebuilts/jdk/jdk8/${hostPrebuiltTag}")
37 ctx.Strict("ANDROID_JAVA_TOOLCHAIN", "${JavaToolchain}")
38 ctx.Strict("JAVA", "${JavaCmd} ${JavaVmFlags}")
39 ctx.Strict("JAVAC", "${JavacCmd} ${JavacVmFlags}")
40 ctx.Strict("JAR", "${JarCmd}")
[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 …]
Dlicenses.go108 func RegisterLicensesPackageMapper(ctx RegisterMutatorsContext) {
109 ctx.BottomUp("licensesPackageMapper", licensesPackageMapper).Parallel()
115 func RegisterLicensesPropertyGatherer(ctx RegisterMutatorsContext) {
116 ctx.BottomUp("licensesPropertyGatherer", licensesPropertyGatherer).Parallel()
120 func RegisterLicensesDependencyChecker(ctx RegisterMutatorsContext) {
121 ctx.BottomUp("licensesPropertyChecker", licensesDependencyChecker).Parallel()
125 func licensesPackageMapper(ctx BottomUpMutatorContext) {
126 p, ok := ctx.Module().(*packageModule)
131 licenses := getLicenses(ctx, p)
133 dir := ctx.ModuleDir()
[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
48 SetImageVariation(ctx BaseModuleContext, variation string)
72 func imageMutator(ctx BottomUpMutatorContext) {
73 if ctx.Os() != Android {
[all …]
Dtest_suites.go40 func (t *testSuiteFiles) GenerateBuildActions(ctx SingletonContext) {
43 ctx.VisitAllModules(func(m Module) {
49 name := ctx.ModuleName(m)
55 t.robolectric = robolectricTestSuite(ctx, files["robolectric-tests"])
56 ctx.Phony("robolectric-tests", t.robolectric...)
58 t.ravenwood = ravenwoodTestSuite(ctx, files["ravenwood-tests"])
59 ctx.Phony("ravenwood-tests", t.ravenwood...)
62 func (t *testSuiteFiles) MakeVars(ctx MakeVarsContext) {
63 ctx.DistForGoal("robolectric-tests", t.robolectric...)
64 ctx.DistForGoal("ravenwood-tests", t.ravenwood...)
[all …]
Drule_builder_test.go58 ctx := builderContext()
60 rule := NewRuleBuilder(pctx, ctx)
63 Tool(PathForSource(ctx, "ld")).
65 FlagWithOutput("-o ", PathForOutput(ctx, "linked"))
84 ctx := builderContext()
86 rule := NewRuleBuilder(pctx, ctx)
89 Tool(PathForSource(ctx, "cp")).
90 Input(PathForSource(ctx, "a")).
91 Output(PathForOutput(ctx, "b"))
93 Tool(PathForSource(ctx, "cp")).
[all …]
/build/soong/cc/
Dmakevars.go53 func makeStringOfKeys(ctx android.MakeVarsContext, key android.OnceKey) string {
54 set := getNamedMapForConfig(ctx.Config(), key)
82 func makeVarsProvider(ctx android.MakeVarsContext) {
83 ctx.Strict("LLVM_RELEASE_VERSION", "${config.ClangShortVersion}")
84 ctx.Strict("LLVM_PREBUILTS_VERSION", "${config.ClangVersion}")
85 ctx.Strict("LLVM_PREBUILTS_BASE", "${config.ClangBase}")
86 ctx.Strict("LLVM_PREBUILTS_PATH", "${config.ClangBin}")
87 ctx.Strict("CLANG", "${config.ClangBin}/clang")
88 ctx.Strict("CLANG_CXX", "${config.ClangBin}/clang++")
89 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. "+
50 ctx.PropertyErrorf(prop, "Bad flag: `%s`, use the correct target soong rule.", flag)
55 ctx.PropertyErrorf(prop, "`-include` only takes one argument: `%s`", flag)
[all …]
Dcoverage.go71 func getGcovProfileLibraryName(ctx ModuleContextIntf) string {
75 if ctx.useSdk() {
82 func getClangProfileLibraryName(ctx ModuleContextIntf) string {
83 if ctx.useSdk() {
85 } else if ctx.isCfiAssemblySupportEnabled() {
93 func (cov *coverage) deps(ctx DepsContext, deps Deps) Deps {
94 if cov.Properties.NeedCoverageVariant && ctx.Device() {
95 ctx.AddVariationDependencies([]blueprint.Variation{
97 }, CoverageDepTag, getGcovProfileLibraryName(ctx))
98 ctx.AddVariationDependencies([]blueprint.Variation{
[all …]
Dndk_abi.go26 func getNdkAbiDumpInstallBase(ctx android.PathContext) android.OutputPath {
27 return android.PathForOutput(ctx).Join(ctx, "abi-dumps/ndk")
30 func getNdkAbiDumpTimestampFile(ctx android.PathContext) android.OutputPath {
31 return android.PathForOutput(ctx, "ndk_abi_dump.timestamp")
40 func (n *ndkAbiDumpSingleton) GenerateBuildActions(ctx android.SingletonContext) {
42 ctx.VisitAllModules(func(module android.Module) {
43 if !module.Enabled(ctx) {
49 if canDumpAbi(ctx.Config()) {
59 ctx.Build(pctx, android.BuildParams{
61 Output: getNdkAbiDumpTimestampFile(ctx),
[all …]
Dsdk.go27 func sdkMutator(ctx android.BottomUpMutatorContext) {
28 if ctx.Os() != android.Android {
32 switch m := ctx.Module().(type) {
34 ccModule, isCcModule := ctx.Module().(*Module)
37ctx.ModuleErrorf("UseSdk() must return true when AlwaysSdk is set, did the factory forget to set S…
39 modules := ctx.CreateVariations("sdk")
42 modules := ctx.CreateVariations("", "sdk")
51 if ctx.Config().UnbundledBuildApps() {
64 ctx.AliasVariation("")
71 ctx.CreateVariations("")
[all …]
Dndk_sysroot.go64 func RegisterNdkModuleTypes(ctx android.RegistrationContext) {
65 ctx.RegisterModuleType("ndk_headers", NdkHeadersFactory)
66 ctx.RegisterModuleType("ndk_library", NdkLibraryFactory)
67 ctx.RegisterModuleType("versioned_ndk_headers", VersionedNdkHeadersFactory)
68 ctx.RegisterModuleType("preprocessed_ndk_headers", preprocessedNdkHeadersFactory)
69 ctx.RegisterParallelSingletonType("ndk", NdkSingleton)
72 func getNdkInstallBase(ctx android.PathContext) android.OutputPath {
73 return android.PathForNdkInstall(ctx)
77 func getNdkSysrootBase(ctx android.PathContext) android.OutputPath {
78 return getNdkInstallBase(ctx).Join(ctx, "sysroot")
[all …]
/build/soong/tradefed/
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/blueprint/
Dtransition_test.go25 ctx := newContext()
26 ctx.MockFileSystem(map[string][]byte{
30 ctx.RegisterBottomUpMutator("deps", depsMutator)
31 ctx.RegisterTransitionMutator("transition", transitionTestMutator{})
32 ctx.RegisterBottomUpMutator("post_transition_deps", postTransitionDepsMutator)
34 ctx.RegisterModuleType("transition_module", newTransitionModule)
35 _, errs := ctx.ParseBlueprintsFiles("Android.bp", nil)
40 _, errs = ctx.ResolveDependencies(nil)
45 return ctx, nil
104 func getTransitionModule(ctx *Context, name, variant string) *transitionModule {
[all …]
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, ok := ModuleProvider(ctx, providerTestUnsetInfoProvider)
65 _, _ = ModuleProvider(ctx, providerTestUnusedMutatorProvider)
67 …SetProvider(ctx, providerTestGenerateBuildActionsInfoProvider, &providerTestGenerateBuildActionsIn…
68 Value: ctx.ModuleName(),
71 mp, ok := ModuleProvider(ctx, providerTestMutatorInfoProvider)
76 ctx.VisitDirectDeps(func(module Module) {
77 gbap, _ := OtherModuleProvider(ctx, module, providerTestGenerateBuildActionsInfoProvider)
84 func providerTestDepsMutator(ctx BottomUpMutatorContext) {
85 if p, ok := ctx.Module().(*providerTestModule); ok {
[all …]
/build/soong/rust/
Dsanitize_test.go154 ctx := result.TestContext
156 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_binary_no_override", variant), None)
157 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_binary_override_default_async", variant), None)
158 …checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_binary_override_default_disable", variant), No…
159 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_binary_override_default_sync", variant), None)
161 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_test_no_override", variant), None)
162 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_test_override_default_async", variant), None)
163 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_test_override_default_disable", variant), None)
164 checkHasMemtagNote(t, ctx.ModuleForTests("no_memtag_test_override_default_sync", variant), None)
166 checkHasMemtagNote(t, ctx.ModuleForTests("set_memtag_binary_no_override", variant), Async)
[all …]
Dtesting.go172 func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
173 ctx.RegisterModuleType("rust_benchmark", RustBenchmarkFactory)
174 ctx.RegisterModuleType("rust_benchmark_host", RustBenchmarkHostFactory)
175 ctx.RegisterModuleType("rust_binary", RustBinaryFactory)
176 ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory)
177 ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory)
178 ctx.RegisterModuleType("rust_bindgen_host", RustBindgenHostFactory)
179 ctx.RegisterModuleType("rust_test", RustTestFactory)
180 ctx.RegisterModuleType("rust_test_host", RustTestHostFactory)
181 ctx.RegisterModuleType("rust_library", RustLibraryFactory)
[all …]
/build/soong/ui/build/
Dbuild.go30 func SetupOutDir(ctx Context, config Config) {
31 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "Android.mk"))
32 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "CleanSpec.mk"))
33 ensureEmptyDirectoriesExist(ctx, config.TempDir())
45 ensureEmptyFileExists(ctx, katiEnabledMarker)
50 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), "ninja_build"))
51 ensureEmptyFileExists(ctx, filepath.Join(config.OutDir(), ".out-dir"))
56 ctx.Fatalln("Failed to write BUILD_DATETIME to file:", err)
59 ctx.Fatalln("Missing BUILD_DATETIME_FILE")
76 writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", buildNumber)
[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)
56 func getRBEVars(ctx Context, config Config) map[string]string {
68 name, err := config.rbeSockAddr(absPath(ctx, config.TempDir()))
70 ctx.Fatalf("Error retrieving socket address: %v", err)
87 func cleanupRBELogsDir(ctx Context, config Config) {
94 fmt.Fprintln(ctx.Writer, "\033[33mUnable to remove RBE log directory: ", err, "\033[0m")
98 func checkRBERequirements(ctx Context, config Config) {
100 ctx.Fatalf("Unable to start RBE reproxy\nFAILED: Missing LOAS credentials.")
[all …]
/build/soong/java/
Dplatform_bootclasspath.go28 func registerPlatformBootclasspathBuildComponents(ctx android.RegistrationContext) {
29 ctx.RegisterParallelSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
108 func (b *platformBootclasspathModule) DepsMutator(ctx android.BottomUpMutatorContext) {
110 ctx.AddDependency(ctx.Module(), apexContributionsMetadataDepTag, "all_apex_contributions")
112 b.hiddenAPIDepsMutator(ctx)
114 if !dexpreopt.IsDex2oatNeeded(ctx) {
120 dexpreopt.RegisterToolDeps(ctx)
123 func (b *platformBootclasspathModule) hiddenAPIDepsMutator(ctx android.BottomUpMutatorContext) {
124 if ctx.Config().DisableHiddenApiChecks() {
129 apiLevelToStubLibModules := hiddenAPIComputeMonolithicStubLibModules(ctx.Config())
[all …]
Dhiddenapi_singleton.go27 func RegisterHiddenApiSingletonComponents(ctx android.RegistrationContext) {
28 ctx.RegisterParallelSingletonType("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 …]
Dsdk.go35 func UseApiFingerprint(ctx android.BaseModuleContext) (useApiFingerprint bool, fingerprintSdkVersio…
36 if ctx.Config().UnbundledBuild() && !ctx.Config().AlwaysUsePrebuiltSdks() {
37 apiFingerprintTrue := ctx.Config().IsEnvTrue("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT")
38 dessertShaIsSet := ctx.Config().Getenv("UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA") != ""
42ctx.ModuleErrorf("UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true cannot be set alongside wit…
47 …fingerprintSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", android.Ap…
48 fingerprintDeps = android.ApiFingerprintPath(ctx)
51 fingerprintSdkVersion = ctx.Config().Getenv("UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA")
57 func defaultJavaLanguageVersion(ctx android.EarlyModuleContext, s android.SdkSpec) javaVersion {
58 sdk, err := s.EffectiveVersion(ctx)
[all …]
/build/soong/androidmk/androidmk/
Dandroid.go373 func splitAndAssign(ctx variableAssignmentContext, splitFunc listSplitFunc, namesByClassification m…
374 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.ListType)
393 err = setVariable(ctx.file, ctx.append, ctx.prefix, name, component, true)
402 func localIncludeDirs(ctx variableAssignmentContext) error {
403 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "include_dirs", …
406 func exportIncludeDirs(ctx variableAssignmentContext) error {
409 …return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_…
412 func local32BitOnly(ctx variableAssignmentContext) error {
413 val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.BoolType)
425 return setVariable(ctx.file, false, ctx.prefix, "compile_multilib", thirtyTwo, true)
[all …]
/build/soong/dexpreopt/
Dclass_loader_context_test.go51 ctx := testContext()
57 m.AddContext(ctx, AnySdkVersion, "a'", optional, buildPath(ctx, "a"), installPath(ctx, "a"), nil)
58 m.AddContext(ctx, AnySdkVersion, "b", optional, buildPath(ctx, "b"), installPath(ctx, "b"), nil)
59 m.AddContext(ctx, AnySdkVersion, "c", optional, buildPath(ctx, "c"), installPath(ctx, "c"), nil)
64 …m1.AddContext(ctx, AnySdkVersion, "a1", optional, buildPath(ctx, "a1"), installPath(ctx, "a1"), ni…
65 …m1.AddContext(ctx, AnySdkVersion, "b1", optional, buildPath(ctx, "b1"), installPath(ctx, "b1"), ni…
68 …m2.AddContext(ctx, AnySdkVersion, "a2", optional, buildPath(ctx, "a2"), installPath(ctx, "a2"), ni…
69 …m2.AddContext(ctx, AnySdkVersion, "b2", optional, buildPath(ctx, "b2"), installPath(ctx, "b2"), ni…
70 m2.AddContext(ctx, AnySdkVersion, "c2", optional, buildPath(ctx, "c2"), installPath(ctx, "c2"), m1)
73 …m3.AddContext(ctx, AnySdkVersion, "a3", optional, buildPath(ctx, "a3"), installPath(ctx, "a3"), ni…
[all …]

12345678910>>...26