Merge "Make the build fail when the executable prebuilt target check fails." am: dee171a859 am: 5c3f09cb39 am: 1be17f1595 am: 8bf690343f

Original change: https://android-review.googlesource.com/c/platform/build/+/1442940

Change-Id: Ia7c65d199cebd5295087e9d55fe47e7d96a4cc6f
diff --git a/core/soong_cc_prebuilt.mk b/core/soong_cc_prebuilt.mk
index 770408c..a12ef66 100644
--- a/core/soong_cc_prebuilt.mk
+++ b/core/soong_cc_prebuilt.mk
@@ -151,7 +151,7 @@
 ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true)
 	$(copy-or-link-prebuilt-to-target)
   ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
-	[ -x $@ ] || $(call echo-error,$@,Target of symlink is not executable)
+	[ -x $@ ] || ( $(call echo-error,$@,Target of symlink is not executable); false )
   endif
 else
 	$(transform-prebuilt-to-target)
diff --git a/core/soong_rust_prebuilt.mk b/core/soong_rust_prebuilt.mk
index 2f4c6e7..dea7340 100644
--- a/core/soong_rust_prebuilt.mk
+++ b/core/soong_rust_prebuilt.mk
@@ -60,7 +60,7 @@
 ifeq ($(LOCAL_IS_HOST_MODULE) $(if $(filter EXECUTABLES SHARED_LIBRARIES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),true,),true true)
 	$(copy-or-link-prebuilt-to-target)
   ifneq ($(filter EXECUTABLES NATIVE_TESTS,$(LOCAL_MODULE_CLASS)),)
-	[ -x $@ ] || $(call echo-error,$@,Target of symlink is not executable)
+	[ -x $@ ] || ( $(call echo-error,$@,Target of symlink is not executable); false )
   endif
 else
 	$(transform-prebuilt-to-target)