Do not use ART_IMT_SIZE for IMT size configuration.

Changing the IMT size requires bumping the image version,
so configuration by an environment variable is dangerous.

Test: m
Change-Id: I60313d200b424496ee3e571db7e78cd3d87493b0
diff --git a/build/art.go b/build/art.go
index 6b684c2..8deea23 100644
--- a/build/art.go
+++ b/build/art.go
@@ -50,9 +50,6 @@
 		cflags = append(cflags, "-DART_USE_TLAB=1")
 	}
 
-	imtSize := ctx.Config().GetenvWithDefault("ART_IMT_SIZE", "43")
-	cflags = append(cflags, "-DIMT_SIZE="+imtSize)
-
 	if ctx.Config().IsEnvTrue("ART_HEAP_POISONING") {
 		cflags = append(cflags, "-DART_HEAP_POISONING=1")
 		asflags = append(asflags, "-DART_HEAP_POISONING=1")
diff --git a/runtime/imtable.h b/runtime/imtable.h
index 48a8643..5db3d07 100644
--- a/runtime/imtable.h
+++ b/runtime/imtable.h
@@ -17,10 +17,6 @@
 #ifndef ART_RUNTIME_IMTABLE_H_
 #define ART_RUNTIME_IMTABLE_H_
 
-#ifndef IMT_SIZE
-#error IMT_SIZE not defined
-#endif
-
 #include "base/casts.h"
 #include "base/enums.h"
 #include "base/locks.h"
@@ -36,7 +32,8 @@
   // Interface method table size. Increasing this value reduces the chance of two interface methods
   // colliding in the interface method table but increases the size of classes that implement
   // (non-marker) interfaces.
-  static constexpr size_t kSize = IMT_SIZE;
+  // When this value changes, old images become incompatible, so image file version must change too.
+  static constexpr size_t kSize = 43;
 
   uint8_t* AddressOfElement(size_t index, PointerSize pointer_size) {
     return reinterpret_cast<uint8_t*>(this) + OffsetOfElement(index, pointer_size);