Skip to content

Commit

Permalink
[truffle] Disable setting process name in AOT until we can link the n…
Browse files Browse the repository at this point in the history
…ative method properly.
  • Loading branch information
nirvdrum committed Oct 25, 2016
1 parent e798498 commit 0c2ec06
Showing 1 changed file with 7 additions and 2 deletions.
@@ -1,5 +1,6 @@
package org.jruby.truffle.platform.darwin;

import com.oracle.truffle.api.TruffleOptions;
import jnr.ffi.LibraryLoader;
import jnr.ffi.Pointer;
import org.jruby.truffle.platform.ProcessName;
Expand All @@ -20,12 +21,16 @@ public class DarwinProcessName implements ProcessName {
private final CrtExterns crtExterns;

public DarwinProcessName() {
crtExterns = LibraryLoader.create(CrtExterns.class).failImmediately().library("libSystem.B.dylib").load();
if (TruffleOptions.AOT) {
crtExterns = null;
} else {
crtExterns = LibraryLoader.create(CrtExterns.class).failImmediately().library("libSystem.B.dylib").load();
}
}

@Override
public boolean canSet() {
return true;
return !TruffleOptions.AOT;
}

@Override
Expand Down

0 comments on commit 0c2ec06

Please sign in to comment.