Lines Matching refs:ctx

31 func globalFlags(ctx android.LoadHookContext) ([]string, []string) {
35 opt := ctx.Config().GetenvWithDefault("ART_NDEBUG_OPT_FLAG", "-O3")
40 gcType := ctx.Config().GetenvWithDefault("ART_DEFAULT_GC_TYPE", "CMS")
42 if ctx.Config().IsEnvTrue("ART_TEST_DEBUG_GC") {
52 imtSize := ctx.Config().GetenvWithDefault("ART_IMT_SIZE", "43")
55 if ctx.Config().IsEnvTrue("ART_HEAP_POISONING") {
59 if ctx.Config().IsEnvTrue("ART_USE_CXX_INTERPRETER") {
63 if !ctx.Config().IsEnvFalse("ART_USE_READ_BARRIER") && ctx.Config().ArtUseReadBarrier() {
66 barrierType := ctx.Config().GetenvWithDefault("ART_READ_BARRIER_TYPE", "BAKER")
75 if !ctx.Config().IsEnvFalse("ART_USE_GENERATIONAL_CC") {
79 cdexLevel := ctx.Config().GetenvWithDefault("ART_DEFAULT_COMPACT_DEX_LEVEL", "fast")
87 if len(ctx.Config().SanitizeDevice()) > 0 || len(ctx.Config().SanitizeHost()) > 0 {
101 if ctx.Config().IsEnvTrue("ART_ENABLE_ADDRESS_SANITIZER") {
107 if !ctx.Config().IsEnvFalse("USE_D8_DESUGAR") {
114 func debugFlags(ctx android.LoadHookContext) []string {
117 opt := ctx.Config().GetenvWithDefault("ART_DEBUG_OPT_FLAG", "-O2")
123 func deviceFlags(ctx android.LoadHookContext) []string {
126 if len(ctx.Config().SanitizeDevice()) > 0 {
134 cflags = append(cflags, "-DART_BASE_ADDRESS="+ctx.Config().LibartImgDeviceBaseAddress())
135 if ctx.Config().IsEnvTrue("ART_TARGET_LINUX") {
140 …minDelta := ctx.Config().GetenvWithDefault("LIBART_IMG_TARGET_MIN_BASE_ADDRESS_DELTA", "-0x1000000…
141 maxDelta := ctx.Config().GetenvWithDefault("LIBART_IMG_TARGET_MAX_BASE_ADDRESS_DELTA", "0x1000000")
148 func hostFlags(ctx android.LoadHookContext) []string {
151 if len(ctx.Config().SanitizeHost()) > 0 {
161 cflags = append(cflags, "-DART_BASE_ADDRESS="+ctx.Config().LibartImgHostBaseAddress())
162 minDelta := ctx.Config().GetenvWithDefault("LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA", "-0x1000000")
163 maxDelta := ctx.Config().GetenvWithDefault("LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA", "0x1000000")
167 …if len(ctx.Config().SanitizeHost()) > 0 && !ctx.Config().IsEnvFalse("ART_ENABLE_ADDRESS_SANITIZER"…
175 func globalDefaults(ctx android.LoadHookContext) {
193 p.Cflags, p.Asflags = globalFlags(ctx)
194 p.Target.Android.Cflags = deviceFlags(ctx)
195 p.Target.Host.Cflags = hostFlags(ctx)
197 if ctx.Config().IsEnvTrue("ART_DEX_FILE_ACCESS_TRACKING") {
204 ctx.AppendProperties(p)
207 func debugDefaults(ctx android.LoadHookContext) {
213 p.Cflags = debugFlags(ctx)
214 ctx.AppendProperties(p)
217 func customLinker(ctx android.LoadHookContext) {
218 linker := ctx.Config().Getenv("CUSTOM_TARGET_LINKER")
228 ctx.AppendProperties(p)
231 func prefer32Bit(ctx android.LoadHookContext) {
241 if ctx.Config().IsEnvTrue("HOST_PREFER_32_BIT") {
247 ctx.PrependProperties(p)
258 func testInstall(ctx android.InstallHookContext) {
259 testMap := testMap(ctx.Config())
262 if ctx.Host() {
267 name += ctx.Arch().ArchType.String() + "_" + ctx.ModuleName()
273 tests = append(tests, ctx.Path().ToMakePath().String())
332 android.AddLoadHook(module, func(ctx android.LoadHookContext) {
333 if ctx.Config().IsEnvTrue("HOST_PREFER_32_BIT") {
344 ctx.AppendProperties(p)
345 log.Print("Disabling host build of " + ctx.ModuleName() + " for HOST_PREFER_32_BIT=true")
369 …android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, staticAndSharedLib…
377 …android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, staticAndSharedLib…
385 android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, staticLibrary) })