Skip to content

Commit

Permalink
[GR-7849] [GR-8810] Add basic support for standalone native launcher …
Browse files Browse the repository at this point in the history
…outside of GraalVM.

PullRequest: graal/1144
  • Loading branch information
eregon committed Mar 26, 2018
2 parents 85309ca + dfaa6ac commit ac78c6f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,22 @@ protected final void launch(String[] args) {
}
}

protected static final boolean IN_GRAALVM = !Boolean.getBoolean("org.graalvm.launcher.standalone");

final void launch(List<String> args, Map<String, String> defaultOptions, boolean doNativeSetup) {
Map<String, String> polyglotOptions = defaultOptions;
if (polyglotOptions == null) {
polyglotOptions = new HashMap<>();
}

if (isAOT() && doNativeSetup) {
if (isAOT() && doNativeSetup && IN_GRAALVM) {
assert nativeAccess != null;
nativeAccess.setGraalVMProperties();
}

List<String> unrecognizedArgs = preprocessArguments(args, polyglotOptions);

if (isAOT() && doNativeSetup) {
if (isAOT() && doNativeSetup && IN_GRAALVM) {
assert nativeAccess != null;
nativeAccess.maybeExec(args, false, polyglotOptions, getDefaultVMType());
}
Expand Down

0 comments on commit ac78c6f

Please sign in to comment.