Skip to content

Commit

Permalink
Set sulong.LLVM=3.2 for now
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Jan 30, 2017
1 parent 9dd0e50 commit 9f7a9a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/contributor/cexts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TruffleRuby, Sulong and C extensions

TruffleRuby runs C extension using Sulong. You should build Sulong from source.
Set `SULONG_VERSION=3.2` when building.

https://github.com/graalvm/sulong

Expand Down
3 changes: 1 addition & 2 deletions tool/jt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def self.find_graal_javacmd_and_options
vm_args << '-cp'
vm_args << [nfi_classes, sulong_dependencies, *sulong_jars].join(':')
vm_args << '-XX:-UseJVMCIClassLoader'
vm_args << "-Dsulong.DynamicBitcodeLibraries=#{Dir.glob("#{graal_home}/mxbuild/projects/com.oracle.truffle.llvm.libraries/bin/*.bc").join(':')}"
end
options = []
else
Expand Down Expand Up @@ -392,7 +391,7 @@ def llvm_opt(*args)
end

def sulong_run(*args)
mx_sulong 'su-run', *args
mx_sulong 'su-run', '-Dsulong.LLVM=3.2', *args
end

def sulong_link(*args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ public void ensureCExtImplementationLoaded(VirtualFrame frame, String feature, I
throw new RaiseException(context.getCoreExceptions().loadError("Sulong is required to support C extensions, and it doesn't appear to be available", feature, null));
}

System.setProperty("sulong.LLVM", "3.2");

final CallTarget callTarget = getCExtLibRuby(feature);
callNode.call(frame, callTarget, new Object[] {});

Expand Down

0 comments on commit 9f7a9a5

Please sign in to comment.