Skip to content
Snippets Groups Projects
Commit 3e8fc621 authored by Mick Jordan's avatar Mick Jordan
Browse files

add envar variant for setting FastROptions

parent b6af4612
Branches
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@
*/
package com.oracle.truffle.r.runtime;
import java.util.Map;
import java.util.Map.Entry;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
......@@ -165,6 +166,20 @@ public enum FastROptions {
}
}
}
for (Map.Entry<String, String> entry : System.getenv().entrySet()) {
String name = entry.getKey();
if (name.startsWith("FASTR_OPTION_")) {
name = name.replace("FASTR_OPTION_", "");
String value = entry.getValue();
if (value == null || value.equals("true") || value.equals("")) {
FastROptions.setValue(name, true);
} else if (value.equals("false")) {
FastROptions.setValue(name, false);
} else {
FastROptions.setValue(name, value);
}
}
}
initialized = true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment