Skip to content

Commit

Permalink
Fix library search path on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
seven1m committed Jan 8, 2024
1 parent 4e43408 commit 0aa9785
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/natalie
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ class Runner

def run_temp_and_wait(path)
build_dir = File.expand_path('../build', __dir__)
env = { 'LD_LIBRARY_PATH' => "#{build_dir}:#{build_dir}/onigmo/lib" }
var_name = RUBY_PLATFORM =~ /darwin/ ? 'DYLD_LIBRARY_PATH' : 'LD_LIBRARY_PATH'
env = { var_name => Natalie::Compiler::CppBackend::LIB_PATHS.join(':') }
pid = spawn(env, path, *ARGV)
Process.wait(pid)
@run_result = $?
Expand Down

0 comments on commit 0aa9785

Please sign in to comment.