Skip to content

Commit 4e35b62

Browse files
authored
Make sure to install the locally-build LLVMExtra. (#299)
Without it, the RPATH isn't stripped, and we may end up loading the wrong libLLVM.
1 parent 7612aa3 commit 4e35b62

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

deps/build_local.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ isdir(scratch_dir) && rm(scratch_dir; recursive=true)
3131
source_dir = joinpath(@__DIR__, "LLVMExtra")
3232

3333
# Build!
34-
@info "Building" source_dir scratch_dir LLVM_DIR
35-
run(`$(cmake()) -DLLVM_DIR=$(LLVM_DIR) -B$(scratch_dir) -S$(source_dir)`)
36-
run(`$(cmake()) --build $(scratch_dir)`)
34+
mktempdir() do build_dir
35+
@info "Building" source_dir scratch_dir build_dir LLVM_DIR
36+
run(`$(cmake()) -DLLVM_DIR=$(LLVM_DIR) -DCMAKE_INSTALL_PREFIX=$(scratch_dir) -B$(build_dir) -S$(source_dir)`)
37+
run(`$(cmake()) --build $(build_dir)`)
38+
run(`$(cmake()) --install $(build_dir)`)
39+
end
3740

3841
# Discover built libraries
3942
built_libs = filter(readdir(joinpath(scratch_dir, "lib"))) do file

0 commit comments

Comments
 (0)