From 87e8076545db195f3b0fb463540a15935a239682 Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Fri, 25 Apr 2014 11:18:13 -0700 Subject: [PATCH] Minor fixes to build script --- build.gradle | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/build.gradle b/build.gradle index 17ece1c1..dbfc339f 100644 --- a/build.gradle +++ b/build.gradle @@ -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) { -- 2.39.5