diff --git a/Project.toml b/Project.toml index ab008af9..b21b8365 100644 --- a/Project.toml +++ b/Project.toml @@ -6,10 +6,12 @@ version = "0.1.0" CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" MLIR_jll = "a70bccb4-a5c0-5e2e-a329-e731972457e8" +Preferences = "21216c6a-2e73-6563-6e65-726566657250" ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63" [compat] CEnum = "0.4" MLIR_jll = "14,15,16" +Preferences = "1" ScopedValues = "1" julia = "1.9" diff --git a/src/MLIR.jl b/src/MLIR.jl index 894120d9..d11dd789 100644 --- a/src/MLIR.jl +++ b/src/MLIR.jl @@ -1,10 +1,11 @@ module MLIR +using Preferences using ScopedValues import MLIR_jll -const MLIR_VERSION = ScopedValue(Base.libllvm_version) -const MLIR_C_PATH = ScopedValue(MLIR_jll.mlir_c) +const MLIR_VERSION = ScopedValue(VersionNumber(@load_preference("MLIR_VERSION", Base.libllvm_version_string))) +const MLIR_C_PATH = ScopedValue(@load_preference("MLIR_C_PATH", MLIR_jll.mlir_c)) struct MLIRException <: Exception msg::String