Skip to content

Commit

Permalink
Use active project for snoopl (#341)
Browse files Browse the repository at this point in the history
It's common to use projects and load libraries not in the base environment, or possibly ones with different versions.
  • Loading branch information
chriselrod authored Feb 13, 2023
1 parent 2cf5ce1 commit 6818678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SnoopCompileCore/src/snoopl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function snoopl(flags, func_file, llvm_file, commands)
Core.eval(Main, deserialize(stdin))
end
"""
process = open(`$(Base.julia_cmd()) $flags --eval $code_object`, stdout, write=true)
process = open(`$(Base.julia_cmd()) $flags --eval $code_object --project=$(Base.active_project())`, stdout, write=true)
serialize(process, quote
let func_io = open($func_file, "w"), llvm_io = open($llvm_file, "w")
ccall(:jl_dump_emitted_mi_name, Nothing, (Ptr{Nothing},), func_io.handle)
Expand Down

0 comments on commit 6818678

Please sign in to comment.