changeset 7154:5fbd8e8b79e2

RT-37314: Need to specify -DNDEBUG for production builds Reviewed-by: prr, ddhill
author kcr
date Thu, 29 May 2014 06:20:39 -0700
parents de18e90945ce
children a2f71b788390
files buildSrc/armv5sf.gradle buildSrc/armv6hf.gradle buildSrc/armv6sf.gradle buildSrc/armv7hf.gradle buildSrc/armv7sf.gradle buildSrc/linux.gradle buildSrc/win.gradle buildSrc/x86egl.gradle
diffstat 8 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/buildSrc/armv5sf.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/armv5sf.gradle	Thu May 29 06:20:39 2014 -0700
@@ -85,7 +85,7 @@
 // Specify the compilation parameters and link parameters
 def ccFlags = [
         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()
 
--- a/buildSrc/armv6hf.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/armv6hf.gradle	Thu May 29 06:20:39 2014 -0700
@@ -93,7 +93,7 @@
 // Specify the compilation parameters and link parameters
 def ccFlags = [
         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()
 
--- a/buildSrc/armv6sf.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/armv6sf.gradle	Thu May 29 06:20:39 2014 -0700
@@ -84,7 +84,7 @@
 // Specify the compilation parameters and link parameters
 def ccFlags = [
         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()
 
--- a/buildSrc/armv7hf.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/armv7hf.gradle	Thu May 29 06:20:39 2014 -0700
@@ -94,7 +94,7 @@
 // Specify the compilation parameters and link parameters
 def ccFlags = [
         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()
 
--- a/buildSrc/armv7sf.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/armv7sf.gradle	Thu May 29 06:20:39 2014 -0700
@@ -84,7 +84,7 @@
 // Specify the compilation parameters and link parameters
 def ccFlags = [
         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/$jniPlatform", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()
 
--- a/buildSrc/linux.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/linux.gradle	Thu May 29 06:20:39 2014 -0700
@@ -51,7 +51,7 @@
 // Specify the compilation parameters and link parameters
 def ccFlags = [
         commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c",
-        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()
 
--- a/buildSrc/win.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/win.gradle	Thu May 29 06:20:39 2014 -0700
@@ -44,7 +44,7 @@
         "/D_STATIC_CPPLIB", "/D_DISABLE_DEPRECATE_STATIC_CPPLIB", "/DINLINE=__inline",
         "/DUNICODE", "/D_UNICODE", "/DWIN32", "/DIAL", "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN",
         "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32",
-        IS_DEBUG_NATIVE ? ["/MDd", "/Od", "/Zi", "/DDEBUG"] : ["/O2", "/MD"]].flatten();
+        IS_DEBUG_NATIVE ? ["/MDd", "/Od", "/Zi", "/DDEBUG"] : ["/O2", "/MD", "/DNDEBUG"]].flatten();
 
 def linkFlags = ["/nologo", "/dll", "/manifest", "/opt:REF", "/incremental:no"];
 if (IS_DEBUG_NATIVE) linkFlags.add("/debug");
--- a/buildSrc/x86egl.gradle	Wed May 28 16:29:53 2014 -0700
+++ b/buildSrc/x86egl.gradle	Thu May 29 06:20:39 2014 -0700
@@ -95,6 +95,7 @@
         commonFlags,
         "-I$JDK_HOME/include", "-I$JDK_HOME/include/${jniPlatform}", "-c",
         IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : "-O2"].flatten()
+        IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten()
 //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])
 def linkFlags = ["-shared", commonFlags].flatten()