@@ -101,10 +101,6 @@ protected List<String> preprocessArguments(List<String> args, Map<String, String
101
101
config .appendOptionValue (OptionsCatalog .LOAD_PATHS , path );
102
102
}
103
103
104
- if (isAOT ()) {
105
- setRubyLauncher ();
106
- }
107
-
108
104
} catch (CommandLineException commandLineException ) {
109
105
System .err .println (TruffleRuby .SIMPLE_NAME + ": " + commandLineException .getMessage ());
110
106
if (commandLineException .isUsageError ()) {
@@ -245,6 +241,11 @@ private static void debugPreInitialization() {
245
241
}
246
242
247
243
private Context createContext (Context .Builder builder , CommandLineOptions config ) {
244
+ if (isAOT ()) {
245
+ final String launcher = ProcessProperties .getExecutableName ();
246
+ builder .option (OptionsCatalog .LAUNCHER .getName (), launcher );
247
+ }
248
+
248
249
if (!config .isSetInPolyglotOptions (OptionsCatalog .EMBEDDED .getName ())) {
249
250
builder .option (OptionsCatalog .EMBEDDED .getName (), "false" );
250
251
}
@@ -275,15 +276,6 @@ private static List<String> getPathListFromEnvVariable(String name) {
275
276
return Collections .emptyList ();
276
277
}
277
278
278
- private String setRubyLauncher () {
279
- if (String .class .cast (config .getOption (OptionsCatalog .LAUNCHER )).isEmpty ()) {
280
- final String launcher = ProcessProperties .getExecutableName ();
281
- config .setOption (OptionsCatalog .LAUNCHER , launcher );
282
- return launcher ;
283
- }
284
- return null ;
285
- }
286
-
287
279
private static void printPreRunInformation (CommandLineOptions config ) {
288
280
if (config .showVersion ) {
289
281
System .out .println (TruffleRuby .getVersionString (getImplementationNameFromEngine (), isAOT ()));
0 commit comments