Skip to content

Commit

Permalink
Constraint LLVM_full_jll version based on Julia version
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Jan 5, 2024
1 parent 6fb9e27 commit 65d3fcf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 1 addition & 3 deletions deps/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[deps]
LLVM_full_jll = "a3ccf953-465e-511d-b87f-60a6490c289d"

[compat]
LLVM_full_jll = "15"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using LLVM_full_jll
include("llvm_installer.jl")

println("Environment")
println("- llvm-config = $(LLVM_full_jll.get_llvm_config_path())")
Expand Down
17 changes: 17 additions & 0 deletions deps/llvm_installer.jl
Original file line number Diff line number Diff line change
@@ -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))")

0 comments on commit 65d3fcf

Please sign in to comment.