Skip to content
Snippets Groups Projects
Commit ac7cc4b4 authored by Gilles Duboscq's avatar Gilles Duboscq
Browse files

Remove <rffi> from graalvm distributions

parent 85661799
No related branches found
No related tags found
No related merge requests found
...@@ -196,30 +196,14 @@ class FastRArchiveParticipant: ...@@ -196,30 +196,14 @@ class FastRArchiveParticipant:
include_dir = join(release_project.dir, 'include') include_dir = join(release_project.dir, 'include')
shutil.rmtree(include_dir) shutil.rmtree(include_dir)
def mx_post_parse_cmd_line(opts):
if os.environ.has_key('FASTR_RFFI'):
val = os.environ['FASTR_RFFI']
else:
val = ""
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'): def mx_post_parse_cmd_line(opts):
_instantiate_graalvm_support_dist() mx.instantiateDistribution('FASTR_RELEASE<rffi>', dict(rffi=mx.get_env('FASTR_RFFI', '')))
for dist in mx_fastr._fastr_suite.dists: for dist in mx_fastr._fastr_suite.dists:
if isinstance(dist, mx.JARDistribution): if isinstance(dist, mx.JARDistribution):
dist.set_archiveparticipant(FastRArchiveParticipant(dist)) dist.set_archiveparticipant(FastRArchiveParticipant(dist))
def _instantiate_graalvm_support_dist():
if os.environ.has_key('FASTR_RFFI'):
mx.abort('Cannot instantiate the GraalVM support distribution when \'FASTR_RFFI\' is set. Found: \'{}\''.format(os.environ.has_key('FASTR_RFFI')))
if not os.environ.has_key('FASTR_RELEASE'):
mx.abort('Cannot instantiate the GraalVM support distribution when \'FASTR_RELEASE\' is not set.')
if not mx.distribution('FASTR_GRAALVM_RELEASE', fatalIfMissing=False):
mx.instantiateDistribution('fastr:FASTR_GRAALVM_RELEASE<rffi>', dict(rffi='', os=mx.get_os(), arch=mx.get_arch()))
if not mx.distribution('fastr:FASTR_GRAALVM_SUPPORT', fatalIfMissing=False):
mx.instantiateDistribution('fastr:FASTR_GRAALVM_SUPPORT<rffi>', dict(rffi=''))
mx_sdk.register_component(mx_sdk.GraalVmLanguage( mx_sdk.register_component(mx_sdk.GraalVmLanguage(
name='FastR', name='FastR',
...@@ -236,5 +220,4 @@ mx_sdk.register_component(mx_sdk.GraalVmLanguage( ...@@ -236,5 +220,4 @@ mx_sdk.register_component(mx_sdk.GraalVmLanguage(
'link:<support>/bin/Rscript', 'link:<support>/bin/Rscript',
'link:<support>/bin/exec/R', 'link:<support>/bin/exec/R',
], ],
instantiate_dist=_instantiate_graalvm_support_dist,
)) ))
...@@ -463,22 +463,15 @@ suite = { ...@@ -463,22 +463,15 @@ suite = {
}, },
}, },
"FASTR_GRAALVM_RELEASE<rffi>": { "FASTR_GRAALVM_RELEASE": {
"native" : True, "native" : True,
"platformDependent" : True, "platformDependent" : True,
"relpath" : True, "relpath" : True,
"description" : "a binary release of FastR", "description" : "a binary release of FastR",
"dependencies" : ["com.oracle.truffle.r.release"], "dependencies" : ["com.oracle.truffle.r.release"],
"os_arch" : {
"<others>" : {
"<others>" : {
"path" : "mxbuild/dists/<os>/<arch>/<rffi>/fastr-graalvm-release.tar.gz",
},
},
},
}, },
"FASTR_GRAALVM_SUPPORT<rffi>" : { "FASTR_GRAALVM_SUPPORT" : {
"native" : True, "native" : True,
"platformDependent" : True, "platformDependent" : True,
"description" : "FastR support distribution for the GraalVM", "description" : "FastR support distribution for the GraalVM",
...@@ -486,7 +479,7 @@ suite = { ...@@ -486,7 +479,7 @@ suite = {
"./" : [ "./" : [
{ {
"source_type" : "extracted-dependency", "source_type" : "extracted-dependency",
"dependency" : "FASTR_GRAALVM_RELEASE<rffi>", "dependency" : "FASTR_GRAALVM_RELEASE",
"path" : "*", "path" : "*",
"exclude" : [ "exclude" : [
"COPYRIGHT", "COPYRIGHT",
...@@ -499,7 +492,7 @@ suite = { ...@@ -499,7 +492,7 @@ suite = {
}, },
{ {
"source_type" : "extracted-dependency", "source_type" : "extracted-dependency",
"dependency" : "FASTR_GRAALVM_RELEASE<rffi>", "dependency" : "FASTR_GRAALVM_RELEASE",
"path" : "bin/fastr_jars/*", "path" : "bin/fastr_jars/*",
"exclude" : [ "exclude" : [
"bin/fastr_jars/fastr.jar", "bin/fastr_jars/fastr.jar",
...@@ -509,9 +502,9 @@ suite = { ...@@ -509,9 +502,9 @@ suite = {
}, },
"dependency:fastr:GNUR", "dependency:fastr:GNUR",
], ],
"COPYRIGHT_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE<rffi>/COPYRIGHT", "COPYRIGHT_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/COPYRIGHT",
"LICENSE_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE<rffi>/LICENSE", "LICENSE_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/LICENSE",
"README_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE<rffi>/README.md", "README_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/README.md",
"bin/Rscript" : "file:com.oracle.truffle.r.release/src/Rscript_legacy", "bin/Rscript" : "file:com.oracle.truffle.r.release/src/Rscript_legacy",
"bin/exec/R" : "file:com.oracle.truffle.r.release/src/R_legacy", "bin/exec/R" : "file:com.oracle.truffle.r.release/src/R_legacy",
"legacy/" : "dependency:fastr:FASTR_LEGACY_LAUNCHER", "legacy/" : "dependency:fastr:FASTR_LEGACY_LAUNCHER",
......
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