Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deps/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
RustToolChain = "e9dc52e2-edb8-4742-9783-5e542d30dbb5"
3 changes: 2 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using Pkg
using Libdl: dlext
using RustToolChain: cargo

const DEV_DIR::String = joinpath(dirname(dirname(@__DIR__)), "sparse-ir-rs")

# Check if the sparse-ir-rs directory exists locally; if not, do nothing.
# If it exists, build the Rust project and copy libsparse_ir_capi.<ext> to deps/.
if isdir(DEV_DIR)
cd(DEV_DIR) do
run(`cargo build --release --features system-blas`)
run(`$(cargo()) build --release --features system-blas`)
end
libsparseir_path = joinpath(DEV_DIR, "target", "release", "libsparse_ir_capi.$(dlext)")
cp(libsparseir_path, joinpath(@__DIR__, "libsparse_ir_capi.$(dlext)"); force=true)
Expand Down
3 changes: 1 addition & 2 deletions utils/generate_C_API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ using Pkg
Pkg.activate(@__DIR__)
Pkg.instantiate()

using Clang.Generators
using Clang.LibClang.Clang_jll
using Clang.Generators: load_options, get_default_args, create_context, build!

# Function to print help message
function print_help()
Expand Down
Loading