diff --git a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/LegacyLauncher.java b/com.oracle.truffle.r.legacylauncher/src/com/oracle/truffle/r/legacylauncher/LegacyLauncher.java similarity index 97% rename from com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/LegacyLauncher.java rename to com.oracle.truffle.r.legacylauncher/src/com/oracle/truffle/r/legacylauncher/LegacyLauncher.java index 2faf5416d6c644264173eee60083a674236cd15b..7623ebce445a9744d1df905b17aa082d09babcc1 100644 --- a/com.oracle.truffle.r.launcher/src/com/oracle/truffle/r/launcher/LegacyLauncher.java +++ b/com.oracle.truffle.r.legacylauncher/src/com/oracle/truffle/r/legacylauncher/LegacyLauncher.java @@ -20,7 +20,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package com.oracle.truffle.r.launcher; +package com.oracle.truffle.r.legacylauncher; import java.lang.reflect.Method; import java.util.Arrays; diff --git a/com.oracle.truffle.r.release/src/R_legacy b/com.oracle.truffle.r.release/src/R_legacy index 29aca7da3924238ac6ce1e2f3c15828c5b24cbe0..ea2a1d052c24ac7c8099b726478d20570517c067 100755 --- a/com.oracle.truffle.r.release/src/R_legacy +++ b/com.oracle.truffle.r.release/src/R_legacy @@ -36,7 +36,7 @@ done JAVA_HOME="$( dirname "$JRE" )" GRAALVMCP="" -TMPCP="jre/languages/R/fastr.jar" +TMPCP="jre/languages/R/legacy/fastr-legacy-launcher.jar" for cp in ${TMPCP//:/ } do GRAALVMCP="$GRAALVMCP$JAVA_HOME/$cp:" @@ -49,4 +49,4 @@ fi # we can invoke FastR directly, but we do have to set R_HOME export R_HOME="$JRE/languages/R" -exec "$JAVA_HOME/bin/java" -cp "$GRAALVMCP" -noverify -Dgraal.TruffleCompilationThreshold=10000 -Dgraal.TruffleCompilerThreads=2 -Xmx8g "${JAVA_ARGS[@]}" com.oracle.truffle.r.launcher.LegacyLauncher com.oracle.truffle.r.launcher.RCommand "${FASTR_INTERNAL_ARGS[@]}" "${PROGRAM_ARGS[@]}" +exec "$JAVA_HOME/bin/java" -cp "$GRAALVMCP" -noverify -Dgraal.TruffleCompilationThreshold=10000 -Dgraal.TruffleCompilerThreads=2 -Xmx8g "${JAVA_ARGS[@]}" com.oracle.truffle.r.legacylauncher.LegacyLauncher com.oracle.truffle.r.launcher.RCommand "${FASTR_INTERNAL_ARGS[@]}" "${PROGRAM_ARGS[@]}" diff --git a/com.oracle.truffle.r.release/src/Rscript_legacy b/com.oracle.truffle.r.release/src/Rscript_legacy index c036c3812aa9453849dfa2cd0c86eb45729b8700..ea6bb96e2fb3dd9323ac17940d3e5e5a7b95a1fd 100755 --- a/com.oracle.truffle.r.release/src/Rscript_legacy +++ b/com.oracle.truffle.r.release/src/Rscript_legacy @@ -36,7 +36,7 @@ done JAVA_HOME="$( dirname "$JRE" )" GRAALVMCP="" -TMPCP="jre/languages/R/fastr.jar" +TMPCP="jre/languages/R/legacy/fastr-legacy-launcher.jar" for cp in ${TMPCP//:/ } do GRAALVMCP="$GRAALVMCP$JAVA_HOME/$cp:" @@ -49,4 +49,4 @@ fi # we can invoke FastR directly, but we do have to set R_HOME export R_HOME="$JRE/languages/R" -exec "$JAVA_HOME/bin/java" -cp "$GRAALVMCP" -noverify -Dgraal.TruffleCompilationThreshold=10000 -Dgraal.TruffleCompilerThreads=2 -Xmx4g "${JAVA_ARGS[@]}" com.oracle.truffle.r.launcher.LegacyLauncher com.oracle.truffle.r.launcher.RscriptCommand "${FASTR_INTERNAL_ARGS[@]}" "${PROGRAM_ARGS[@]}" +exec "$JAVA_HOME/bin/java" -cp "$GRAALVMCP" -noverify -Dgraal.TruffleCompilationThreshold=10000 -Dgraal.TruffleCompilerThreads=2 -Xmx4g "${JAVA_ARGS[@]}" com.oracle.truffle.r.legacylauncher.LegacyLauncher com.oracle.truffle.r.launcher.RscriptCommand "${FASTR_INTERNAL_ARGS[@]}" "${PROGRAM_ARGS[@]}" diff --git a/mx.fastr/mx_fastr_dists.py b/mx.fastr/mx_fastr_dists.py index d158385a3b511648b8c58058619428d65c76c94d..fd2767e4d6c0eada905cd843ee1de685cf40fd9d 100644 --- a/mx.fastr/mx_fastr_dists.py +++ b/mx.fastr/mx_fastr_dists.py @@ -204,6 +204,9 @@ def mx_post_parse_cmd_line(opts): if not mx.distribution('FASTR_RELEASE{}'.format(val), fatalIfMissing=False): mx.instantiateDistribution('FASTR_RELEASE<rffi>', dict(rffi=val)) + if not val and os.environ.has_key('FASTR_RELEASE') and not mx.distribution('fastr:FASTR_GRAALVM_SUPPORT', fatalIfMissing=False): + mx.instantiateDistribution('fastr:FASTR_GRAALVM_SUPPORT<rffi>', dict(rffi='')) + for dist in mx_fastr._fastr_suite.dists: if isinstance(dist, mx.JARDistribution): dist.set_archiveparticipant(FastRArchiveParticipant(dist)) diff --git a/mx.fastr/suite.py b/mx.fastr/suite.py index 3b7aa407e854289a7516304dba9f2813f5aedb05..4134b0accbde757ab8bf90342d561ec0e9ed92e4 100644 --- a/mx.fastr/suite.py +++ b/mx.fastr/suite.py @@ -241,6 +241,19 @@ suite = { "jacoco" : "include", }, + "com.oracle.truffle.r.legacylauncher" : { + "sourceDirs" : ["src"], + "dependencies" : [ + "sdk:GRAAL_SDK", + ], + "checkstyle" : "com.oracle.truffle.r.runtime", + "javaCompliance" : "1.8", + "annotationProcessors" : [ + ], + "workingSets" : "Truffle,FastR", + "jacoco" : "include", + }, + "com.oracle.truffle.r.ffi.impl" : { "sourceDirs" : ["src"], "dependencies" : [ @@ -352,6 +365,14 @@ suite = { "maven" : "False", }, + "FASTR_LEGACY_LAUNCHER" : { + "description" : "legacy launcher for the GraalVM", + "dependencies" : ["com.oracle.truffle.r.legacylauncher"], + "distDependencies" : [ + "sdk:GRAAL_SDK" + ], + }, + "FASTR" : { "description" : "class files for compiling against FastR in a separate suite", "dependencies" : [ @@ -478,6 +499,7 @@ suite = { "README_FASTR" : "extracted-dependency:fastr:FASTR_RELEASE<rffi>/README.md", "bin/Rscript" : "file:com.oracle.truffle.r.release/src/Rscript_legacy", "bin/exec/R" : "file:com.oracle.truffle.r.release/src/R_legacy", + "legacy/" : "dependency:fastr:FASTR_LEGACY_LAUNCHER", }, } },