From ff9d7a5d17a026d5674e1d342032e7e70090b123 Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Fri, 25 Apr 2014 09:54:32 -0700 Subject: [PATCH] Adding support for 'full' patches Also, minor fixes to build.gradle --- build.gradle | 15 +++++++++------ gradle.properties | 5 +++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 21b5eecd..17ece1c1 100644 --- a/build.gradle +++ b/build.gradle @@ -59,6 +59,7 @@ project('hotspot') { args 'status' standardOutput os } + // Purge unversioned files def str = os.toString() def matcher = str =~ /(?m)^\?\s+(.*)$/ matcher.each { @@ -68,7 +69,7 @@ project('hotspot') { // Use hg import since ant.patchfile requires 'patch' to be installed exec { executable 'hg' - args 'import', '--no-commit', "../patches/light-${hotspotTag}.patch" + args 'import', '--no-commit', "../patches/${flavor}-${hotspotTag}.patch" } } @@ -145,6 +146,7 @@ project('dcevm') { test { executable new File(targetJreFile, 'bin/java') + jvmArgs '-XX:LogFile=build/hotspot.log' jvmArgs "-XXaltjvm=${jvmName}" jvmArgs '-javaagent:../agent/build/libs/agent.jar' if (arch == Arch.X86_64) { @@ -208,18 +210,19 @@ enum Os { // Helper task to run make targets against hotspot class InvokeMake extends org.gradle.api.tasks.Exec { InvokeMake() { + def root = project.rootProject logging.captureStandardOutput LogLevel.INFO - if (project.rootProject.os != Os.WINDOWS) { + if (root.os != Os.WINDOWS) { commandLine 'make', '-C', 'make' } else { // Using launcher script commandLine 'cmd', '/c', '..\\build.cmd' - environment ARCH: project.rootProject.arch == Arch.X86 ? 'x86' : 'x64' + environment ARCH: root.arch == Arch.X86 ? 'x86' : 'x64' } args 'OPENJDK=true' - args "HOTSPOT_BUILD_VERSION=dcevmlight-${project.rootProject.buildNumber}" - args "ARCH_DATA_MODEL=${project.rootProject.arch.bits}" - args "ALT_BOOTDIR=${project.rootProject.jre.replace('\\', '/')}/.." + args "HOTSPOT_BUILD_VERSION=dcevm${root.flavor}-${root.buildNumber}" + args "ARCH_DATA_MODEL=${root.arch.bits}" + args "ALT_BOOTDIR=${root.jre.replace('\\', '/')}/.." // Replacing backslashes is essential for Windows! args 'COMPILER_WARNINGS_FATAL=false' // Clang is very serious about warnings args 'HOTSPOT_BUILD_JOBS=4' diff --git a/gradle.properties b/gradle.properties index 8e06b54d..14fef854 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,6 +4,9 @@ traceRedefinition=1 # Which JVM kind to use for testing, fastdebug (produces better crash reports) or product (faster). kind=fastdebug +# Which flavor of DCEVM to use, full (supports most redefinitons) or light (more JDK versions supported) +flavor=light + # If should use compressed oops (-XX:+UseCompressedOops) or not for testing. oops=compressed @@ -23,6 +26,8 @@ targetJre=build/jre # Tag to base DCEVM on hotspotTag=jdk8u5-b13 #hotspotTag=jdk7u51-b13 +#hotspotTag=jdk7u45-b08 +#hotspotTag=jdk7u40-b43 # Repository to clone hotspot from hotspotRepository=http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot -- 2.39.5