Merge "Replace  in recipe with subshell."
am: 0fda1ea

* commit '0fda1eaa43c8d6018e757671a2c92d635e681d93':
  Replace $(shell) in recipe with subshell.

Change-Id: Ia9f2f0a55a2c44cece5af4311383f26d686d456f
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 3a43336..457f1d4 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -19,6 +19,18 @@
 # The default value for LOCAL_DEX_PREOPT
 DEX_PREOPT_DEFAULT ?= true
 
+# The default values for pre-opting: always preopt PIC.
+# Conditional to building on linux, as dex2oat currently does not work on darwin.
+ifeq ($(HOST_OS),linux)
+  WITH_DEXPREOPT_PIC ?= true
+  WITH_DEXPREOPT ?= true
+# For an eng build only pre-opt the boot image. This gives reasonable performance and still
+# allows a simple workflow: building in frameworks/base and syncing.
+  ifeq (eng,$(TARGET_BUILD_VARIANT))
+    WITH_DEXPREOPT_BOOT_IMG_ONLY ?= true
+  endif
+endif
+
 GLOBAL_DEXPREOPT_FLAGS :=
 ifeq ($(WITH_DEXPREOPT_PIC),true)
 # Compile boot.oat as position-independent code if WITH_DEXPREOPT_PIC=true