Merge "Error on USE_CLANG_PLATFORM_BUILD=" am: 7b31dd1094 am: 893f32053f
am: ca5083195e

* commit 'ca5083195e9bde7379c30ee3507d4e0a5037abf5':
  Error on USE_CLANG_PLATFORM_BUILD=

Change-Id: Ide0e78cf5bc08bc98e5a1fbde23045c9a7180a9d
diff --git a/core/Makefile b/core/Makefile
index 39756a3..3ca4e51 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -982,7 +982,7 @@
   $(hide) mkdir -p $(TARGET_RECOVERY_OUT)
   $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc $(TARGET_RECOVERY_ROOT_OUT)/sdcard $(TARGET_RECOVERY_ROOT_OUT)/tmp
   @echo Copying baseline ramdisk...
-  $(hide) rsync -a --exclude=etc --exclude=sdcard $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # "cp -Rf" fails to overwrite broken symlinks on Mac.
+  $(hide) rsync -a --exclude=etc --exclude=sdcard $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # "cp -Rf" fails to overwrite broken symlinks on Mac.
   @echo Modifying ramdisk contents...
   $(hide) rm -f $(TARGET_RECOVERY_ROOT_OUT)/init*.rc
   $(hide) cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/
@@ -1464,6 +1464,9 @@
 cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS)
 	$(build-cacheimage-target)
 
+else # BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
+# we need to ignore the broken cache link when doing the rsync
+IGNORE_CACHE_LINK := --exclude=cache
 endif # BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE
 
 
diff --git a/core/version_defaults.mk b/core/version_defaults.mk
index 363a0d4..2d37850 100644
--- a/core/version_defaults.mk
+++ b/core/version_defaults.mk
@@ -91,7 +91,7 @@
     # assuming the device can only support APIs as of the previous official
     # public release.
     # This value will always be 0 for release builds.
-    PLATFORM_PREVIEW_SDK_VERSION := 4
+    PLATFORM_PREVIEW_SDK_VERSION := 1
   endif
 endif