Ejemplo n.º 1
0
def buildSvmImage(args):
    """build a shared SubstrateVM library to run Graal.nodejs"""
    with _import_substratevm() as _svm:
        _svm.flag_suitename_map['nodejs'] = ('graal-nodejs', ['TRUFFLENODE'], ['TRUFFLENODE_NATIVE'], 'js')
        _js_version = VC.get_vc(_suite.vc_dir).parent(_suite.vc_dir)
        mx.logv('Fetch JS version {}'.format(_js_version))
        for _lang in ['js', 'nodejs']:
            _svm.fetch_languages(['--language:{}=version={}'.format(_lang, _js_version)])
        with _svm.native_image_context() as _native_image:
            _native_image(['--language:nodejs', '-H:JNIConfigurationFiles={}'.format(join(_suite.dir, 'svmnodejs.jniconfig'))] + args)
Ejemplo n.º 2
0
def buildSvmImage(args):
    """build a shared SubstrateVM library to run Graal.nodejs"""
    _svm = _import_substratevm()
    _svm.flag_suitename_map['nodejs'] = ('graal-nodejs', ['TRUFFLENODE'], ['TRUFFLENODE_GRAALVM_SUPPORT'], 'js')
    _js_version = VC.get_vc(_suite.vc_dir).parent(_suite.vc_dir)
    mx.logv('Fetch JS version {}'.format(_js_version))
    for _lang in ['js', 'nodejs']:
        _svm.fetch_languages(['--language:{}=version={}'.format(_lang, _js_version)])
    _svm.fetch_languages(['--tool:regex'])
    with _svm.native_image_context() as _native_image:
        _native_image(['--language:nodejs', '-H:JNIConfigurationResources=svmnodejs.jniconfig'] + args)
Ejemplo n.º 3
0
def buildSvmImage(args):
    """build a shared SubstrateVM library to run Graal.nodejs"""
    _svm = _import_substratevm()
    _svm.flag_suitename_map['nodejs'] = ('graal-nodejs', ['TRUFFLENODE'],
                                         ['TRUFFLENODE_GRAALVM_SUPPORT'], 'js')
    _js_version = VC.get_vc(_suite.vc_dir).parent(_suite.vc_dir)
    mx.logv('Fetch JS version {}'.format(_js_version))
    for _lang in ['js', 'nodejs']:
        _svm.truffle_language_ensure(_lang, _js_version)
    _svm.native_image_on_jvm([
        '-H:+EnforceMaxRuntimeCompileMethods', '--language:nodejs',
        '-H:JNIConfigurationResources=svmnodejs.jniconfig'
    ] + args)