Revert "Revert "Make PIC and PREOPT default for all.""

bug:25801231

This reverts commit f2a9135ed14a59da38a65a0218e8e8486620a3ad.

Change-Id: I2eca605212b78505667af1f7e9c83f5cca5db35a
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index e0dde01..6499b63 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -19,6 +19,13 @@
 # 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
+endif
+
 # $(1): the .jar or .apk to remove classes.dex
 define dexpreopt-remove-classes.dex
 $(hide) zip --quiet --delete $(1) classes.dex; \