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

Avoid using template distributions

parent 083acef8
No related branches found
No related tags found
No related merge requests found
......@@ -580,6 +580,7 @@ def nativebuild(args):
os.remove(jniboot_done)
return mx.build(['--no-java'])
def mx_post_parse_cmd_line(opts):
mx_fastr_dists.mx_post_parse_cmd_line(opts)
if mx.suite("sulong", fatalIfMissing=False) and not _fastr_suite.isBinarySuite():
......@@ -588,6 +589,10 @@ def mx_post_parse_cmd_line(opts):
rec = mx.project('com.oracle.truffle.r.native.recommended')
rec.buildDependencies += [mx.distribution('SULONG')]
mx_register_dynamic_suite_constituents = mx_fastr_dists.mx_register_dynamic_suite_constituents
mx_unittest.add_config_participant(_unittest_config_participant)
_commands = {
......
......@@ -198,13 +198,86 @@ class FastRArchiveParticipant:
def mx_post_parse_cmd_line(opts):
mx.instantiateDistribution('FASTR_RELEASE<rffi>', dict(rffi=mx.get_env('FASTR_RFFI', '')))
for dist in mx_fastr._fastr_suite.dists:
if isinstance(dist, mx.JARDistribution):
dist.set_archiveparticipant(FastRArchiveParticipant(dist))
def mx_register_dynamic_suite_constituents(register_project, register_distribution):
rffi = mx.get_env('FASTR_RFFI', '')
fastr_release_distribution = mx.JARDistribution(suite=mx_fastr._fastr_suite,
name="FASTR_RELEASE" + rffi,
subDir=None,
path="mxbuild/dists/<os>/<arch>/{rffi}/fastr-release.jar".format(rffi=rffi),
sourcesPath=None,
deps=["com.oracle.truffle.r.release"],
mainClass=None,
excludedLibs=[],
distDependencies=[],
javaCompliance=None,
platformDependent=True,
theLicense=None)
fastr_release_distribution.description = "a binary release of FastR"
fastr_graalvm_release = mx.NativeTARDistribution(suite=mx_fastr._fastr_suite,
name="FASTR_GRAALVM_RELEASE" + rffi,
deps=["com.oracle.truffle.r.release"],
path=None,
excludedLibs=[],
platformDependent=True,
theLicense=None,
relpath=True,
output=None)
register_distribution(fastr_release_distribution)
register_distribution(fastr_graalvm_release)
if mx.get_env('FASTR_RELEASE') == 'true':
fastr_graalvm_release_support = mx.LayoutTARDistribution(suite=mx_fastr._fastr_suite,
name="FASTR_GRAALVM_SUPPORT" + rffi,
deps=[],
layout={
"./": [
{
"source_type": "extracted-dependency",
"dependency": "FASTR_GRAALVM_RELEASE" + rffi,
"path": "*",
"exclude": [
"COPYRIGHT",
"LICENSE",
"README.md",
"bin/Rscript",
"bin/fastr_jars",
"bin/exec/R",
],
},
{
"source_type": "extracted-dependency",
"dependency": "FASTR_GRAALVM_RELEASE" + rffi,
"path": "bin/fastr_jars/*",
"exclude": [
"bin/fastr_jars/fastr.jar",
"bin/fastr_jars/truffle*",
"bin/fastr_jars/graal-sdk*",
],
},
"dependency:fastr:GNUR",
],
"COPYRIGHT_FASTR": "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE{rffi}/COPYRIGHT".format(rffi=rffi),
"LICENSE_FASTR": "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE{rffi}/LICENSE".format(rffi=rffi),
"README_FASTR": "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE{rffi}/README.md".format(rffi=rffi),
"bin/Rscript": "file:com.oracle.truffle.r.release/src/Rscript_legacy",
"bin/exec/R": "file:com.oracle.truffle.r.release/src/R_legacy",
"R-3.4.0.tar.gz" : "dependency:fastr:GNUR",
"legacy/": "dependency:fastr:FASTR_LEGACY_LAUNCHER",
},
path=None,
platformDependent=True,
theLicense=None)
fastr_graalvm_release_support.description = "FastR support distribution for the GraalVM"
register_distribution(fastr_graalvm_release_support)
mx_sdk.register_component(mx_sdk.GraalVmLanguage(
name='FastR',
id='R',
......
......@@ -435,80 +435,6 @@ suite = {
"maven" : False
},
"FASTR_RELEASE<rffi>": {
"description" : "a binary release of FastR",
"dependencies" : ["com.oracle.truffle.r.release"],
"os_arch" : {
"linux" : {
"amd64" : {
"path" : "mxbuild/dists/linux/amd64/<rffi>/fastr-release.jar",
},
"sparcv9" : {
"path" : "mxbuild/dists/linux/sparcv9/<rffi>/fastr-release.jar",
},
},
"darwin" : {
"amd64" : {
"path" : "mxbuild/dists/darwin/amd64/<rffi>/fastr-release.jar",
},
},
"solaris" : {
"amd64" : {
"path" : "mxbuild/dists/solaris/amd64/<rffi>/fastr-release.jar",
},
"sparcv9" : {
"path" : "mxbuild/dists/solaris/sparcv9/<rffi>/fastr-release.jar",
},
},
},
},
"FASTR_GRAALVM_RELEASE": {
"native" : True,
"platformDependent" : True,
"relpath" : True,
"description" : "a binary release of FastR",
"dependencies" : ["com.oracle.truffle.r.release"],
},
"FASTR_GRAALVM_SUPPORT" : {
"native" : True,
"platformDependent" : True,
"description" : "FastR support distribution for the GraalVM",
"layout" : {
"./" : [
{
"source_type" : "extracted-dependency",
"dependency" : "FASTR_GRAALVM_RELEASE",
"path" : "*",
"exclude" : [
"COPYRIGHT",
"LICENSE",
"README.md",
"bin/Rscript",
"bin/fastr_jars",
"bin/exec/R",
],
},
{
"source_type" : "extracted-dependency",
"dependency" : "FASTR_GRAALVM_RELEASE",
"path" : "bin/fastr_jars/*",
"exclude" : [
"bin/fastr_jars/fastr.jar",
"bin/fastr_jars/truffle*",
"bin/fastr_jars/graal-sdk*",
],
},
],
"COPYRIGHT_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/COPYRIGHT",
"LICENSE_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/LICENSE",
"README_FASTR" : "extracted-dependency:fastr:FASTR_GRAALVM_RELEASE/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",
"R-3.4.0.tar.gz" : "dependency:fastr:GNUR",
"legacy/" : "dependency:fastr:FASTR_LEGACY_LAUNCHER",
},
}
# see mx_fastr_dists.mx_register_dynamic_suite_constituents for the definitions of some RFFI-dependent distributions
},
}
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