]> source.dussan.org Git - dcevm.git/commitdiff
Minor fixes to build script
authorIvan Dubrov <idubrov@guidewire.com>
Fri, 25 Apr 2014 18:18:13 +0000 (11:18 -0700)
committerIvan Dubrov <idubrov@guidewire.com>
Fri, 25 Apr 2014 18:18:13 +0000 (11:18 -0700)
build.gradle

index 17ece1c1db5e36fa4dce83bd2c32d9a2a7382d94..dbfc339fa3602689a9aba778a89ceea4c5d2eae3 100644 (file)
@@ -73,29 +73,30 @@ project('hotspot') {
         }
     }
 
-    task compileFastdebug(type: InvokeMake) {
-        args 'STRIP_POLICY=no_strip'
-        args 'ZIP_DEBUGINFO_FILES=0'
-        args 'ENABLE_FULL_DEBUG_SYMBOLS=1'
-        args 'fastdebug'
-    }
-
-    task compileProduct(type: InvokeMake) {
-        args 'ENABLE_FULL_DEBUG_SYMBOLS=0'
-        args 'product'
-    }
-
-    compileFastdebug.mustRunAfter patch
-    compileProduct.mustRunAfter patch
+    def arguments = ['product':   ['ENABLE_FULL_DEBUG_SYMBOLS=0'],
+                     'fastdebug': ['ENABLE_FULL_DEBUG_SYMBOLS=1', 'STRIP_POLICY=no_strip', 'ZIP_DEBUGINFO_FILES=0']]
+
+    ['product', 'fastdebug'].each { k ->
+        // Compile given kind of DCEVM
+        def compile = task("compile${k.capitalize()}", type: InvokeMake) {
+            args arguments[k]
+            args k
+            doLast {
+                ant.copy(todir: "build/${k}", overwrite: true) {
+                    fileset(dir: "build/${os.buildPath}/${os.buildPath}_${arch.buildArch}_${compiler}/${k}",
+                            includes: 'libjvm.so,libjsig.so,jvm.dll,jsig.dll,libjvm.dylib,libjsig.dylib')
+                }
+            }
+        }
+        compile.mustRunAfter(patch)
 
-    // Install given kind of DCEVM into destination JRE
-    ['Product', 'Fastdebug'].each { k ->
-        task("install${k}", dependsOn: [prepareJvm, "compile${k}"]) << {
+        // Install given kind of DCEVM into destination JRE
+        task("install${k.capitalize()}", dependsOn: [prepareJvm, compile]) << {
             def installPath = new File(new File(targetJreFile, arch == Arch.X86 ? os.installPath32 : os.installPath64), jvmName)
 
-            logger.info("Installing DCEVM runtime into JRE with JVM name '${jvmName}' and kind '${k.toLowerCase()}' at ${installPath}")
+            logger.info("Installing DCEVM runtime into JRE with JVM name '${jvmName}' and kind '${k}' at ${installPath}")
             ant.copy(todir: installPath, overwrite: true) {
-                fileset(dir: "build/${os.buildPath}/${os.buildPath}_${arch.buildArch}_${compiler}/${k.toLowerCase()}",
+                fileset(dir: "build/${os.buildPath}/${os.buildPath}_${arch.buildArch}_${compiler}/${k}",
                         includes: 'libjvm.so,libjsig.so,jvm.dll,jsig.dll,libjvm.dylib,libjsig.dylib')
             }
         }
@@ -146,7 +147,9 @@ project('dcevm') {
     test {
         executable new File(targetJreFile, 'bin/java')
 
-        jvmArgs '-XX:LogFile=build/hotspot.log'
+        if (kind == 'fastdebug') {
+            jvmArgs '-XX:LogFile=build/hotspot.log'
+        }
         jvmArgs "-XXaltjvm=${jvmName}"
         jvmArgs '-javaagent:../agent/build/libs/agent.jar'
         if (arch == Arch.X86_64) {