• Home
  • Raw
  • Download

Lines Matching refs:ctx

26 func globalFlags(ctx android.BaseContext) ([]string, []string) {
30 opt := envDefault(ctx, "ART_NDEBUG_OPT_FLAG", "-O3")
35 gcType := envDefault(ctx, "ART_DEFAULT_GC_TYPE", "CMS")
37 if envTrue(ctx, "ART_TEST_DEBUG_GC") {
47 if !envFalse(ctx, "ART_ENABLE_VDEX") {
51 imtSize := envDefault(ctx, "ART_IMT_SIZE", "43")
54 if envTrue(ctx, "ART_HEAP_POISONING") {
59 if !envFalse(ctx, "ART_USE_READ_BARRIER") && ctx.AConfig().ArtUseReadBarrier() {
62 barrierType := envDefault(ctx, "ART_READ_BARRIER_TYPE", "BAKER")
76 if len(ctx.AConfig().SanitizeDevice()) > 0 || len(ctx.AConfig().SanitizeHost()) > 0 {
94 if envTrue(ctx, "ART_ENABLE_ADDRESS_SANITIZER") {
103 func debugFlags(ctx android.BaseContext) []string {
106 opt := envDefault(ctx, "ART_DEBUG_OPT_FLAG", "-O2")
112 func deviceFlags(ctx android.BaseContext) []string {
115 if len(ctx.AConfig().SanitizeDevice()) > 0 {
123 cflags = append(cflags, "-DART_BASE_ADDRESS="+ctx.AConfig().LibartImgDeviceBaseAddress())
124 if envTrue(ctx, "ART_TARGET_LINUX") {
129 minDelta := envDefault(ctx, "LIBART_IMG_TARGET_MIN_BASE_ADDRESS_DELTA", "-0x1000000")
130 maxDelta := envDefault(ctx, "LIBART_IMG_TARGET_MAX_BASE_ADDRESS_DELTA", "0x1000000")
137 func hostFlags(ctx android.BaseContext) []string {
140 if len(ctx.AConfig().SanitizeHost()) > 0 {
150 cflags = append(cflags, "-DART_BASE_ADDRESS="+ctx.AConfig().LibartImgHostBaseAddress())
151 minDelta := envDefault(ctx, "LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA", "-0x1000000")
152 maxDelta := envDefault(ctx, "LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA", "0x1000000")
159 func globalDefaults(ctx android.LoadHookContext) {
177 p.Cflags, p.Asflags = globalFlags(ctx)
178 p.Target.Android.Cflags = deviceFlags(ctx)
179 p.Target.Host.Cflags = hostFlags(ctx)
181 if envTrue(ctx, "ART_DEX_FILE_ACCESS_TRACKING") {
188 ctx.AppendProperties(p)
191 func debugDefaults(ctx android.LoadHookContext) {
197 p.Cflags = debugFlags(ctx)
198 ctx.AppendProperties(p)
201 func customLinker(ctx android.LoadHookContext) {
202 linker := envDefault(ctx, "CUSTOM_TARGET_LINKER", "")
210 ctx.AppendProperties(p)
214 func prefer32Bit(ctx android.LoadHookContext) {
215 if envTrue(ctx, "HOST_PREFER_32_BIT") {
226 ctx.AppendProperties(p)
236 func testInstall(ctx android.InstallHookContext) {
237 testMap := testMap(ctx.AConfig())
240 if ctx.Host() {
245 name += ctx.Arch().ArchType.String() + "_" + ctx.ModuleName()
251 tests = append(tests, ctx.Path().RelPathString())
284 android.AddLoadHook(module, func(ctx android.LoadHookContext) { codegen(ctx, c, true) })
330 func envDefault(ctx android.BaseContext, key string, defaultValue string) string {
331 ret := ctx.AConfig().Getenv(key)
338 func envTrue(ctx android.BaseContext, key string) bool {
339 return ctx.AConfig().Getenv(key) == "true"
342 func envFalse(ctx android.BaseContext, key string) bool {
343 return ctx.AConfig().Getenv(key) == "false"