changeset 7119:55abe340d827

RT-36056 arm builds should fail if missing toolchain Reviewed-by: kcr
author ddhill
date Fri, 23 May 2014 15:27:06 -0400
parents 419ff0dc23c8
children 2eb6b8e042b3
files buildSrc/android.gradle buildSrc/armv5sf.gradle buildSrc/armv6hf.gradle buildSrc/armv6sf.gradle buildSrc/armv7hf.gradle buildSrc/armv7sf.gradle
diffstat 6 files changed, 24 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/buildSrc/android.gradle	Fri May 23 12:08:30 2014 -0700
+++ b/buildSrc/android.gradle	Fri May 23 15:27:06 2014 -0400
@@ -110,8 +110,7 @@
 def ndk = project.hasProperty("ANDROID_NDK") ? "${ANDROID_NDK}" : null;
 ANDROID.canBuild = sdk != null && ndk != null
 if (!ANDROID.canBuild) {
-    logger.error("Can't build Android. Path to SDK or NDK was not set or is invalid!")
-    return;
+    fail("Can't build Android. Path to SDK or NDK was not set or is invalid!")
 }
 
 ANDROID.canBuild = assertDir(sdk) && assertDir(ndk)
@@ -122,7 +121,7 @@
     if (!assertDir(ndk)) {
         logger.error("Path to ANDROID_NDK is invalid! [$ndk]")
     }
-    return
+    fail("Cannot build, missing android tools")
 }
 
 def sdk_target = project.hasProperty("ANDROID_SDK_TARGET") ?  "${ANDROID_SDK_TARGET}" : getLatestPlatform(sdk);
@@ -139,8 +138,7 @@
 
 ANDROID.canBuild = sdk_target != null && ndk_target != null
 if (!ANDROID.canBuild) {
-    logger.error("Can't determine sdk or ndk target platform!")
-    return
+    fail("Can't determine sdk or ndk target platform!")
 }
 
 def toolchainHome = project.hasProperty("ANDROID_CROSS_TOOLS_VER") ? 
@@ -159,8 +157,7 @@
 
 ANDROID.canBuild = compilerHome != null
 if (!ANDROID.canBuild) {
-    logger.error("Failed to access toolchain [$toolchainHome/prebuilt/$toolsPlatform]!")
-    return
+    fail("Failed to access toolchain [$toolchainHome/prebuilt/$toolsPlatform]!")
 }
 
 def freetypeDir = project.hasProperty("FREETYPE_DIR") ? "${FREETYPE_DIR}" : null
--- a/buildSrc/armv5sf.gradle	Fri May 23 12:08:30 2014 -0700
+++ b/buildSrc/armv5sf.gradle	Fri May 23 15:27:06 2014 -0400
@@ -47,16 +47,15 @@
 } else if (IS_MAC) {
     jniPlatform="darwin"
 } else {
-    println "ERROR: Cannot build on this platform"
-    return;
+    fail( "armv5sf Cannot build on this platform")
 }
 
 // Declare whether this particular target file applies to the current system
 ARMV5SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
 if (!ARMV5SF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
-    return;
+    if (!compilerHome.exists()) println "armv5sf Missing compiler $compilerHome"
+    if (!sdk.exists()) println "armv5sf Missing sdk $sdk"
+    fail("armv5sF missing required tools")
 }
 
 // Lambda for naming the generated libs
--- a/buildSrc/armv6hf.gradle	Fri May 23 12:08:30 2014 -0700
+++ b/buildSrc/armv6hf.gradle	Fri May 23 15:27:06 2014 -0400
@@ -48,8 +48,7 @@
     compilerPrefix="arm-linux-"
     jniPlatform="darwin"
 } else {
-    println "ERROR: Cannot build on this platform"
-    return;
+    fail("armv6hf Cannot build on this platform")
 }
 
 if (rootProject.hasProperty("ARMV6HF_COMPILER")) {
@@ -64,9 +63,9 @@
 // Declare whether this particular target file applies to the current system
 ARMV6HF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
 if (!ARMV6HF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
-    return;
+    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
+    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
+    fail("armv6hf missing required tools")
 }
 
 // Lambda for naming the generated libs
--- a/buildSrc/armv6sf.gradle	Fri May 23 12:08:30 2014 -0700
+++ b/buildSrc/armv6sf.gradle	Fri May 23 15:27:06 2014 -0400
@@ -47,16 +47,16 @@
 } else if (IS_MAC) {
     jniPlatform="darwin"
 } else {
-    println "ERROR: Cannot build on this platform"
+    fail "armv6sf Cannot build on this platform"
     return;
 }
 
 // Declare whether this particular target file applies to the current system
 ARMV6SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
 if (!ARMV6SF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
-    return;
+    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
+    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
+    fail("armv6sf missing required tools")
 }
 
 // Lambda for naming the generated libs
--- a/buildSrc/armv7hf.gradle	Fri May 23 12:08:30 2014 -0700
+++ b/buildSrc/armv7hf.gradle	Fri May 23 15:27:06 2014 -0400
@@ -48,8 +48,7 @@
     compilerPrefix="arm-linux-"
     jniPlatform="darwin"
 } else {
-    println "ERROR: Cannot build on this platform"
-    return;
+    fail("armv7hf Cannot build on this platform")
 }
 
 if (rootProject.hasProperty("ARMV7HF_COMPILER")) {
@@ -64,9 +63,9 @@
 // Declare whether this particular target file applies to the current system
 ARMV7HF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
 if (!ARMV7HF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
-    return;
+    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
+    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
+    fail("armv7hf missing required tools")
 }
 
 // Lambda for naming the generated libs
--- a/buildSrc/armv7sf.gradle	Fri May 23 12:08:30 2014 -0700
+++ b/buildSrc/armv7sf.gradle	Fri May 23 15:27:06 2014 -0400
@@ -47,16 +47,15 @@
 } else if (IS_MAC) {
     jniPlatform="darwin"
 } else {
-    println "ERROR: Cannot build on this platform"
-    return;
+    fail "armv7sf Cannot build on this platform"
 }
 
 // Declare whether this particular target file applies to the current system
 ARMV7SF.canBuild = (IS_LINUX || IS_MAC) && compilerHome.exists() && sdk.exists()
 if (!ARMV7SF.canBuild) {
-    if (!compilerHome.exists()) println "ERROR: Mising compiler $compilerHome"
-    if (!sdk.exists()) println "ERROR: Mising sdk $sdk"
-    return;
+    if (!compilerHome.exists()) println "ERROR: Missing compiler $compilerHome"
+    if (!sdk.exists()) println "ERROR: Missing sdk $sdk"
+    fail("armv7sf missing required tools")
 }
 
 // Lambda for naming the generated libs