@@ -43,6 +43,11 @@ function Base.show(io::IO, t::BuildTimer)
43
43
end
44
44
end
45
45
46
+ # Helper function to get the minimum version supported by the given compat
47
+ # specification, given as a string.
48
+ minimum_compat (compat:: String ) =
49
+ minimum (VersionNumber (rng. lower. t) for rng in PKG_VERSIONS. semver_spec (compat). ranges)
50
+
46
51
const BUILD_HELP = (
47
52
"""
48
53
Usage: build_tarballs.jl [target1,target2,...] [--help]
@@ -174,7 +179,7 @@ function build_tarballs(ARGS, src_name, src_version, sources, script,
174
179
end
175
180
176
181
# Throw an error if we're going to build for platforms not supported by Julia v1.5-.
177
- if any (p -> arch (p) == " armv6l" || (Sys. isapple (p) && arch (p) == " aarch64" ), platforms) && minimum ( VersionNumber (rng . lower . t) for rng in PKG_VERSIONS . semver_spec ( julia_compat) . ranges ) < v " 1.6"
182
+ if any (p -> arch (p) == " armv6l" || (Sys. isapple (p) && arch (p) == " aarch64" ), platforms) && minimum_compat ( julia_compat) < v " 1.6"
178
183
error (" Experimental platforms cannot be used with Julia v1.5-.\n Change `julia_compat` to require at least Julia v1.6" )
179
184
end
180
185
@@ -541,8 +546,7 @@ function register_jll(name, build_version, dependencies, julia_compat;
541
546
lazy_artifacts:: Bool = false ,
542
547
augment_platform_block= " " ,
543
548
kwargs... )
544
- if ! isempty (augment_platform_block) &&
545
- minimum (VersionNumber (rng. lower. t) for rng in PKG_VERSIONS. semver_spec (julia_compat). ranges) < v " 1.6"
549
+ if ! isempty (augment_platform_block) && minimum_compat (julia_compat) < v " 1.6"
546
550
error (" Augmentation blocks cannot be used with Julia v1.5-.\n Change `julia_compat` to require at least Julia v1.6" )
547
551
end
548
552
@@ -1192,9 +1196,12 @@ function build_jll_package(src_name::String,
1192
1196
bin_path:: String ;
1193
1197
verbose:: Bool = false ,
1194
1198
julia_compat:: String = DEFAULT_JULIA_VERSION_SPEC,
1195
- lazy_artifacts:: Bool = false ,
1196
1199
init_block = " " ,
1197
- augment_platform_block = " " ,)
1200
+ augment_platform_block = " " ,
1201
+ # If we support versions older than Julia v1.7 the artifact
1202
+ # should be lazy when we augment the platform.
1203
+ lazy_artifacts:: Bool = ! isempty (augment_platform_block) && minimum_compat (julia_compat) < v " 1.7" ,
1204
+ )
1198
1205
# Make way, for prince artifacti
1199
1206
mkpath (joinpath (code_dir, " src" , " wrappers" ))
1200
1207
0 commit comments