diff --git a/deps/Project.toml b/deps/Project.toml index 02907581..553927e1 100644 --- a/deps/Project.toml +++ b/deps/Project.toml @@ -1,5 +1,3 @@ [deps] LLVM_full_jll = "a3ccf953-465e-511d-b87f-60a6490c289d" - -[compat] -LLVM_full_jll = "15" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" diff --git a/deps/build.jl b/deps/build.jl index 6c0f742c..871d92d2 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -1,4 +1,4 @@ -using LLVM_full_jll +include("llvm_installer.jl") println("Environment") println("- llvm-config = $(LLVM_full_jll.get_llvm_config_path())") diff --git a/deps/llvm_installer.jl b/deps/llvm_installer.jl new file mode 100644 index 00000000..ff6c1664 --- /dev/null +++ b/deps/llvm_installer.jl @@ -0,0 +1,17 @@ +using Pkg + +# TODO(@mofeing) is this the best way to constraint LLVM version based on Julia version? +LLVM_version = if haskey(ENV, "JULIA_LLVM_VERSION") + ENV["JULIA_LLVM_VERSION"] +elseif VERSION >= v"1.10" + "15" +elseif VERSION >= v"1.9" + "14" +else + error("Unsupported Julia version: $(VERSION)") +end +Pkg.add(name="LLVM_full_jll", version=LLVM_version) + +using LLVM_full_jll + +println("- LLVM_full_jll v$(pkgversion(LLVM_full_jll))")