Skip to content
Snippets Groups Projects
Commit 38c2ee33 authored by Mick Jordan's avatar Mick Jordan
Browse files

properly ensure that recommended packages can be built in all situations and...

properly ensure that recommended packages can be built in all situations and are included in the release
parent 41f79d8c
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@
/com.oracle.truffle.r.native/include/linked
/com.oracle.truffle.r.native/fficall/jni.done
/com.oracle.truffle.r.native/fficall/jniboot.done
/com.oracle.truffle.r.native.recommended/install.recommended
/com.oracle.truffle.r.test.native/packages/copy_recommended
/com.oracle.truffle.r.test.native/packages/recommended
/com.oracle.truffle.r.test.native/packages/*/lib/*
......
......@@ -27,7 +27,7 @@ import mx
import mx_gate
import mx_fastr_pkgs
import mx_fastr_dists
from mx_fastr_dists import FastRNativeProject, FastRTestNativeProject, FastRReleaseProject #pylint: disable=unused-import
from mx_fastr_dists import FastRNativeProject, FastRTestNativeProject, FastRReleaseProject, FastRNativeRecommendedProject #pylint: disable=unused-import
import mx_copylib
import mx_fastr_mkgramrd
......@@ -90,7 +90,7 @@ def do_run_r(args, command, extraVmArgs=None, jdk=None, **kwargs):
if not jdk:
jdk = get_default_jdk()
vmArgs = ['-cp', mx.classpath(jdk=jdk)]
vmArgs = ['-cp', mx.classpath('FASTR', jdk=jdk)]
if 'nocompile' in kwargs:
nocompile = True
......
......@@ -263,6 +263,23 @@ class ReleaseBuildTask(mx.NativeBuildTask):
rscript_launcher = join(self.subject.dir, 'src', 'Rscript_launcher')
self._template(rscript_launcher, join(bin_dir, 'Rscript'), template_dict)
class FastRNativeRecommendedProject(mx.NativeProject):
def __init__(self, suite, name, deps, workingSets, theLicense, **args):
mx.NativeProject.__init__(self, suite, name, None, [], deps, workingSets, None, None, join(suite.dir, name), theLicense)
def getBuildTask(self, args):
return NativeRecommendedBuildTask(self, args)
class NativeRecommendedBuildTask(mx.NativeBuildTask):
def __init__(self, project, args):
mx.NativeBuildTask.__init__(self, args, project)
def build(self):
# must archive FASTR before build so that nested mx R CMD INSTALL can execute
mx.archive(['@FASTR'])
mx.NativeBuildTask.build(self)
class FastRArchiveParticipant:
def __init__(self, dist):
self.dist = dist
......@@ -292,7 +309,6 @@ class FastRArchiveParticipant:
include_dir = join(self.release_project.dir, 'include')
shutil.rmtree(include_dir)
def mx_post_parse_cmd_line(opts):
for dist in mx_fastr._fastr_suite.dists:
dist.set_archiveparticipant(FastRArchiveParticipant(dist))
......@@ -261,22 +261,19 @@ suite = {
"com.oracle.truffle.r.release" : {
"sourceDirs" : ["src"],
"dependencies" : ["com.oracle.truffle.r.engine", "com.oracle.truffle.r.runtime.ffi", "com.oracle.truffle.r.native"],
"dependencies" : ["com.oracle.truffle.r.native.recommended"],
"class" : "FastRReleaseProject",
"output" : "com.oracle.truffle.r.release"
},
"com.oracle.truffle.r.native.recommended" : {
"sourceDirs" : [],
# these dependencies ensure that all distributions are built
# before the nested mx that does the CMD INSTALL runs
"dependencies" : [
"com.oracle.truffle.r.release",
"com.oracle.truffle.r.test",
"com.oracle.truffle.r.test.native"
"com.oracle.truffle.r.native",
"com.oracle.truffle.r.engine",
"com.oracle.truffle.r.runtime.ffi"
],
"class" : "FastRNativeRecommendedProject",
"native" : "true",
"output" : "com.oracle.truffle.r.native.recommended",
"workingSets" : "FastR",
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment