Add ART_DEFAULT_COMPACT_DEX_LEVEL

If specified, this option changes the default compact dex level used
by dex2oat. Defaults to none currently.

Bug: 63756964
Test: ART_DEFAULT_COMPACT_DEX_LEVEL=fast mm test-art-host-gtest and verify it fails for now.
Test: test/testrunner/testrunner.py --host -j64 and verify it passes

Change-Id: Ib252f432b3545297725656a5cca40d1bb57b0ced
diff --git a/build/art.go b/build/art.go
index 5704b43..3f598da 100644
--- a/build/art.go
+++ b/build/art.go
@@ -66,6 +66,9 @@
 			"-DART_READ_BARRIER_TYPE_IS_"+barrierType+"=1")
 	}
 
+  cdexLevel := envDefault(ctx, "ART_DEFAULT_COMPACT_DEX_LEVEL", "none")
+  cflags = append(cflags, "-DART_DEFAULT_COMPACT_DEX_LEVEL="+cdexLevel)
+
 	// We need larger stack overflow guards for ASAN, as the compiled code will have
 	// larger frame sizes. For simplicity, just use global not-target-specific cflags.
 	// Note: We increase this for both debug and non-debug, as the overflow gap will