Skip to content

Commit 39beabb

Browse files
sjkellymaleadt
andauthored
Fix issue with __init__ when built in sysimg (#589)
Co-authored-by: Tim Besard <tim.besard@gmail.com>
1 parent 4178477 commit 39beabb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GPUCompiler.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ _precompile_()
5353

5454

5555
compile_cache = "" # defined in __init__()
56+
const pkgver = @static VERSION > v"1.9" ? Base.pkgversion(GPUCompiler) : ""
57+
5658

5759
function __init__()
5860
STDERR_HAS_COLOR[] = get(stderr, :color, false)
@@ -62,7 +64,6 @@ function __init__()
6264
dir = joinpath(dir, "v$(VERSION.major).$(VERSION.minor)")
6365
if VERSION > v"1.9"
6466
## also add the package version
65-
pkgver = Base.pkgversion(GPUCompiler)
6667
dir = joinpath(dir, "v$(pkgver.major).$(pkgver.minor)")
6768
end
6869
mkpath(dir)

0 commit comments

Comments
 (0)