diff --git a/lib/process_shared/posix/libc.rb b/lib/process_shared/posix/libc.rb index f22a799..d82e63b 100644 --- a/lib/process_shared/posix/libc.rb +++ b/lib/process_shared/posix/libc.rb @@ -31,8 +31,11 @@ module ProcessShared File.exists?(File.join(path, helper)) end - ffi_lib File.join(path, helper) - + if defined?(Truffle) + ffi_lib(File.join(::Truffle::Boot.toolchain_paths(:LD_LIBRARY_PATH), 'libgraalvm-llvm.so.1'), File.join(path, helper)) + else + ffi_lib File.join(path, helper) + end [:o_rdwr, :o_creat, :o_excl,