Skip to content

Commit

Permalink
[Truffle] Don't call protection domain methods from AOT.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Oct 12, 2016
1 parent d54a835 commit 2b96057
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -10,6 +10,7 @@
package org.jruby.truffle.interop;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.TruffleOptions;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.Ruby;
import org.jruby.runtime.builtin.IRubyObject;
Expand Down Expand Up @@ -43,7 +44,7 @@ public String getJRubyHome() {
}

private String findJRubyHome() {
if (System.getenv("JRUBY_HOME") == null && System.getProperty("jruby.home") == null) {
if (!TruffleOptions.AOT && System.getenv("JRUBY_HOME") == null && System.getProperty("jruby.home") == null) {
// Set JRuby home automatically for GraalVM
final CodeSource codeSource = Ruby.class.getProtectionDomain().getCodeSource();
if (codeSource != null) {
Expand Down

0 comments on commit 2b96057

Please sign in to comment.