ext/pyroscope/extconf.rb in pyroscope-0.1.1 vs ext/pyroscope/extconf.rb in pyroscope-0.2.0
- old
+ new
@@ -7,11 +7,11 @@
HEADER_DIRS = [INCLUDEDIR]
LIB_DIRS = [LIBDIR, File.expand_path(File.join(File.dirname(__FILE__), "lib"))]
-COMMIT = "df45c48"
+COMMIT = "e44f13d9"
# TODO: this is not very accurate, but it works for now
OS = RUBY_PLATFORM.include?("darwin") ? "mac" : "linux"
ARCH = RUBY_PLATFORM.include?("arm64") ? "arm64" : "amd64"
@@ -22,12 +22,11 @@
def run(str)
system(str) || fail("command failed: #{str}")
end
if ENV["PYROSCOPE_RUBY_LOCAL"]
- puts "PYROSCOPE_RUBY_LOCAL yes"
- # TODO: make configurable
- pyroscope_path = "#{ENV["HOME"]}/pyroscope"
+ puts "PYROSCOPE_RUBY_LOCAL using path #{ENV['PYROSCOPE_RUBY_LOCAL']}}"
+ pyroscope_path = ENV["PYROSCOPE_RUBY_LOCAL"]
run("rm -rf #{File.join(ROOT, "build")}")
run("cd #{pyroscope_path} && make build-rust-dependencies-docker")
run("cp #{pyroscope_path}/out/libpyroscope.rbspy.a #{File.join(ROOT, "lib/libpyroscope.rbspy.a")}")
run("cp #{pyroscope_path}/out/librustdeps.a #{File.join(ROOT, "lib/librustdeps.a")}")
else