Skip to content

Commit

Permalink
Fixes and cleanup for separating Truffle from SVM.
Browse files Browse the repository at this point in the history
  • Loading branch information
chumer committed Jul 31, 2023
1 parent a62e802 commit 6fcd64f
Show file tree
Hide file tree
Showing 71 changed files with 534 additions and 243 deletions.
2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "6.34.0",
"mx_version": "chumer/GR-47445/fix-make-module-path-deterministic",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
Expand Down
4 changes: 3 additions & 1 deletion compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@
"truffle:TRUFFLE_TEST",
"truffle:TRUFFLE_COMPILER",
"truffle:TRUFFLE_RUNTIME",
"regex:TREGEX"
"regex:TREGEX",
"ASM_TREE_9.5",
"ASM_UTIL_9.5",
],
"exclude" : [
"mx:JUNIT",
Expand Down
2 changes: 1 addition & 1 deletion espresso/mx.espresso/jvm-ce
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mx --dynamicimports=/vm,/substratevm --components="Espresso Launcher,LibGraal,SubstrateVM,suite:tools" --native-images=lib:jvmcicompiler --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm,/substratevm
COMPONENTS=Espresso Launcher,LibGraal,SubstrateVM,suite:tools
COMPONENTS=Espresso Launcher,LibGraal,SubstrateVM,suite:tools,tflm
NATIVE_IMAGES=lib:jvmcicompiler
DISABLE_INSTALLABLES=true
2 changes: 1 addition & 1 deletion espresso/mx.espresso/jvm-ce-llvm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mx --dynamicimports=/vm,/substratevm --components="Espresso Launcher,LibGraal,SubstrateVM,Java on Truffle LLVM Java libraries,suite:tools" --native-images=lib:jvmcicompiler --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm,/substratevm
COMPONENTS=Espresso Launcher,LibGraal,SubstrateVM,Java on Truffle LLVM Java libraries,suite:tools
COMPONENTS=Espresso Launcher,LibGraal,SubstrateVM,Java on Truffle LLVM Java libraries,suite:tools,tflm
NATIVE_IMAGES=lib:jvmcicompiler
DISABLE_INSTALLABLES=true
2 changes: 1 addition & 1 deletion espresso/mx.espresso/jvm-ee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mx --dynamicimports=/vm-enterprise,/substratevm-enterprise,/tools-enterprise --components="Espresso Launcher,LibGraal Enterprise,SubstrateVM Enterprise,suite:tools,suite:tools-enterprise" --native-images=lib:jvmcicompiler --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm-enterprise,/substratevm-enterprise,/tools-enterprise
COMPONENTS=Espresso Launcher,LibGraal Enterprise,SubstrateVM Enterprise,suite:tools,suite:tools-enterprise
COMPONENTS=Espresso Launcher,LibGraal Enterprise,SubstrateVM Enterprise,suite:tools,suite:tools-enterprise,tflm
NATIVE_IMAGES=lib:jvmcicompiler
DISABLE_INSTALLABLES=true
EXCLUDE_COMPONENTS=hprf
2 changes: 1 addition & 1 deletion espresso/mx.espresso/jvm-ee-llvm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mx --dynamicimports=/vm-enterprise,/substratevm-enterprise,/tools-enterprise --components="Espresso Launcher,LibGraal Enterprise,SubstrateVM Enterprise,Java on Truffle LLVM Java libraries,suite:tools,suite:tools-enterprise" --native-images=lib:jvmcicompiler --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm-enterprise,/substratevm-enterprise,/tools-enterprise
COMPONENTS=Espresso Launcher,LibGraal Enterprise,SubstrateVM Enterprise,Java on Truffle LLVM Java libraries,suite:tools,suite:tools-enterprise
COMPONENTS=Espresso Launcher,LibGraal Enterprise,SubstrateVM Enterprise,Java on Truffle LLVM Java libraries,suite:tools,suite:tools-enterprise,tflm
NATIVE_IMAGES=lib:jvmcicompiler
DISABLE_INSTALLABLES=true
EXCLUDE_COMPONENTS=hprf
20 changes: 10 additions & 10 deletions espresso/mx.espresso/mx_espresso.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,17 +326,17 @@ def register_espresso_envs(suite):
tools = ['cov', 'dap', 'ins', 'insight', 'insightheap', 'lsp', 'pro', 'truffle-json']
_llvm_toolchain_wrappers = ['bgraalvm-native-clang', 'bgraalvm-native-clang-cl', 'bgraalvm-native-clang++', 'bgraalvm-native-flang', 'bgraalvm-native-ld', 'bgraalvm-native-binutil']
if LLVM_JAVA_HOME:
mx_sdk_vm.register_vm_config('espresso-jvm', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla' , 'cmp', 'antlr4', 'llrc', 'llrn' , 'elau' ] + tools, suite, env_file='jvm-llvm')
mx_sdk_vm.register_vm_config('espresso-jvm-ce', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla' , 'cmp', 'antlr4', 'llrc', 'llrn' , 'svm' , 'svmsl' , 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='jvm-ce-llvm')
mx_sdk_vm.register_vm_config('espresso-jvm-ee', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tfle', 'cmp', 'antlr4', 'llrc', 'llrn', 'cmpee', 'svm', 'svmee', 'svmsl', 'tflllm', 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='jvm-ee-llvm')
mx_sdk_vm.register_vm_config('espresso-native-ce', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla' , 'cmp', 'antlr4', 'llrc', 'llrn' , 'svm' , 'svmsl' , 'tflm' , 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='native-ce-llvm')
mx_sdk_vm.register_vm_config('espresso-native-ee', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tfle', 'cmp', 'antlr4', 'llrc', 'llrn', 'cmpee', 'svm', 'svmsl', 'svmee', 'tflllm', 'tflm' , 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='native-ee-llvm')
mx_sdk_vm.register_vm_config('espresso-jvm', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc' , 'cmp', 'antlr4', 'llrc', 'llrn' , 'elau' ] + tools, suite, env_file='jvm-llvm')
mx_sdk_vm.register_vm_config('espresso-jvm-ce', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc' , 'cmp', 'antlr4', 'llrc', 'llrn' , 'svm', 'svmt' , 'svmsl' , 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='jvm-ce-llvm')
mx_sdk_vm.register_vm_config('espresso-jvm-ee', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc', 'tfle', 'cmp', 'antlr4', 'llrc', 'llrn', 'cmpee', 'svm', 'svmt', 'svmee', 'svmte', 'svmsl', 'tflllm', 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='jvm-ee-llvm')
mx_sdk_vm.register_vm_config('espresso-native-ce', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc' , 'cmp', 'antlr4', 'llrc', 'llrn' , 'svm', 'svmt' , 'svmsl' , 'tflm' , 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='native-ce-llvm')
mx_sdk_vm.register_vm_config('espresso-native-ee', ['java', 'ejvm', 'ellvm', 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc', 'tfle', 'cmp', 'antlr4', 'llrc', 'llrn', 'cmpee', 'svm', 'svmt', 'svmsl', 'svmee', 'svmte', 'tflllm', 'tflm' , 'spolyglot'] + _llvm_toolchain_wrappers + tools, suite, env_file='native-ee-llvm')
else:
mx_sdk_vm.register_vm_config('espresso-jvm', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla' , 'cmp' , 'elau' ] + tools, suite, env_file='jvm')
mx_sdk_vm.register_vm_config('espresso-jvm-ce', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla' , 'cmp' , 'svm', 'svmsl' , 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot' ] + tools, suite, env_file='jvm-ce')
mx_sdk_vm.register_vm_config('espresso-jvm-ee', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tfle', 'cmp' , 'cmpee', 'svm', 'svmsl', 'svmee', 'tflllm', 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot' ] + tools, suite, env_file='jvm-ee')
mx_sdk_vm.register_vm_config('espresso-native-ce', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla' , 'cmp' , 'svm', 'svmsl' , 'tflm' , 'spolyglot' ] + tools, suite, env_file='native-ce')
mx_sdk_vm.register_vm_config('espresso-native-ee', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tfle', 'cmp' , 'cmpee', 'svm', 'svmsl', 'svmee', 'tflllm', 'tflm' , 'spolyglot' ] + tools, suite, env_file='native-ee')
mx_sdk_vm.register_vm_config('espresso-jvm', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc' , 'cmp' , 'elau' ] + tools, suite, env_file='jvm')
mx_sdk_vm.register_vm_config('espresso-jvm-ce', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc' , 'cmp' , 'svm', 'svmt', 'svmsl' , 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot' ] + tools, suite, env_file='jvm-ce')
mx_sdk_vm.register_vm_config('espresso-jvm-ee', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc', 'tfle', 'cmp' , 'cmpee', 'svm', 'svmt', 'svmsl', 'svmee', 'svmte', 'tflllm', 'tflm', 'elau', 'lg', 'bespresso', 'sjavavm', 'spolyglot' ] + tools, suite, env_file='jvm-ee')
mx_sdk_vm.register_vm_config('espresso-native-ce', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc' , 'cmp' , 'svm', 'svmt', 'svmsl' , 'tflm' , 'spolyglot' ] + tools, suite, env_file='native-ce')
mx_sdk_vm.register_vm_config('espresso-native-ee', ['java', 'ejvm' , 'libpoly', 'nfi-libffi', 'nfi', 'sdk', 'sdkl', 'tfl', 'tfla', 'tflc', 'tfle', 'cmp' , 'cmpee', 'svm', 'svmt', 'svmsl', 'svmee', 'svmte', 'tflllm', 'tflm' , 'spolyglot' ] + tools, suite, env_file='native-ee')


register_espresso_envs(_suite)
2 changes: 1 addition & 1 deletion espresso/mx.espresso/native-ce
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mx --dynamicimports=/vm,/substratevm --components="Java on Truffle,SubstrateVM,suite:tools" --native-images=lib:javavm --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm,/substratevm
COMPONENTS=Java on Truffle,SubstrateVM,suite:tools
COMPONENTS=Java on Truffle,SubstrateVM,suite:tools,tflm
NATIVE_IMAGES=lib:javavm
DISABLE_INSTALLABLES=true
2 changes: 1 addition & 1 deletion espresso/mx.espresso/native-ce-llvm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mx --dynamicimports=/vm,/substratevm --components="Java on Truffle,SubstrateVM,Java on Truffle LLVM Java libraries,suite:tools" --native-images=lib:javavm --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm,/substratevm
COMPONENTS=Java on Truffle,SubstrateVM,Java on Truffle LLVM Java libraries,suite:tools
COMPONENTS=Java on Truffle,SubstrateVM,Java on Truffle LLVM Java libraries,suite:tools,tflm
NATIVE_IMAGES=lib:javavm
DISABLE_INSTALLABLES=true
2 changes: 1 addition & 1 deletion espresso/mx.espresso/native-ee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mx --dynamicimports=/vm-enterprise,/substratevm-enterprise,/tools-enterprise --components="Java on Truffle,SubstrateVM Enterprise,suite:tools,suite:tools-enterprise" --native-images=lib:javavm --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm-enterprise,/substratevm-enterprise,/tools-enterprise
COMPONENTS=Java on Truffle,SubstrateVM Enterprise,suite:tools,suite:tools-enterprise
COMPONENTS=Java on Truffle,SubstrateVM Enterprise,suite:tools,suite:tools-enterprise,tflm
NATIVE_IMAGES=lib:javavm
DISABLE_INSTALLABLES=true
EXCLUDE_COMPONENTS=hprf
2 changes: 1 addition & 1 deletion espresso/mx.espresso/native-ee-llvm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# mx --dynamicimports=/vm-enterprise,/substratevm-enterprise,/tools-enterprise --components="Java on Truffle,SubstrateVM Enterprise,Java on Truffle LLVM Java libraries,suite:tools,suite:tools-enterprise" --native-images=lib:javavm --disable-installables=true graalvm-show

DYNAMIC_IMPORTS=/vm-enterprise,/substratevm-enterprise,/tools-enterprise
COMPONENTS=Java on Truffle,SubstrateVM Enterprise,Java on Truffle LLVM Java libraries,suite:tools,suite:tools-enterprise
COMPONENTS=Java on Truffle,SubstrateVM Enterprise,Java on Truffle LLVM Java libraries,suite:tools,suite:tools-enterprise,tflm
NATIVE_IMAGES=lib:javavm
DISABLE_INSTALLABLES=true
EXCLUDE_COMPONENTS=hprf
2 changes: 1 addition & 1 deletion sdk/mx.sdk/mx_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def upx(args):
third_party_license_files=[],
dependencies=[],
jar_distributions=[],
boot_jars=['sdk:GRAAL_SDK', 'sdk:JNIUTILS', 'sdk:NATIVEBRIDGE'],
boot_jars=['sdk:GRAAL_SDK'],
stability="supported",
))

Expand Down
8 changes: 6 additions & 2 deletions sdk/mx.sdk/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@
],
"distDependencies" : [
"GRAAL_SDK",
"LAUNCHER_COMMON"
"LAUNCHER_COMMON",
"mx:JUNIT",
],
"maven" : False,
},
Expand Down Expand Up @@ -570,12 +571,15 @@
"dependencies" : [
"org.graalvm.nativebridge.processor.test"
],
"distDependencies" : [
"mx:JUNIT",
"NATIVEBRIDGE"
],
"requiresConcealed": {
"jdk.internal.vm.ci": [
"jdk.vm.ci.services",
],
},
"distDependencies" : ["NATIVEBRIDGE"],
"maven": False,
"testDistribution" : True,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.graalvm.nativeimage;
package org.graalvm.nativeimage.test;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;

import org.graalvm.nativeimage.ImageSingletons;
import org.junit.Test;

@SuppressWarnings("static-method")
Expand Down
26 changes: 2 additions & 24 deletions substratevm/mx.substratevm/language-nfi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,10 @@
# Possible values: `libffi` (the default) or `none`
DefaultArg = libffi

Args = -H:CLibraryPath=${.}/builder/clibraries-${*} \
Args = -H:Features=com.oracle.svm.truffle.nfi.TruffleNFIFeature,com.oracle.svm.truffle.nfi.posix.PosixTruffleNFIFeature,com.oracle.svm.truffle.nfi.windows.WindowsTruffleNFIFeature \
-H:CLibraryPath=${.}/builder/clibraries-${*} \
-H:MaxRuntimeCompileMethods=600

ImageBuilderClasspath = ${.}/builder/svm-${*}.jar
ImageClasspath = ${.}/truffle-nfi.jar:${.}/truffle-nfi-${*}.jar

ExcludeFromAll=true

# The `--add-exports` are a temporary solution for svm-libffi.jar on classpath, will be fixed by modularization, GR-45103.
JavaArgs = --add-exports org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.c=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.c.function=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.c.libc=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.feature=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.stackvalue=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.handles=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.headers=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.nodes=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.posix=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.headers=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.thread=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.threadlocal=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.util=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.windows=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.core.windows.headers=ALL-UNNAMED \
--add-exports org.graalvm.nativeimage.builder/com.oracle.svm.truffle=ALL-UNNAMED \
--add-exports jdk.internal.vm.compiler/org.graalvm.compiler.word=ALL-UNNAMED
Loading

0 comments on commit 6fcd64f

Please sign in to comment.