@@ -31,19 +31,13 @@ function generate_imports(src_name)
3131 using Pkg. Artifacts: load_artifacts_toml, unpack_platform
3232 using Pkg. BinaryPlatforms: triplet, select_platform
3333 HostPlatform () = platform_key_abi ()
34- if ! @isdefined (augment_platform!)
35- augment_platform! (platform) = platform
36- end
3734 end
3835 else
3936 # Use fast stdlib-based Artifacts + Preferences
4037 return quote
4138 using Libdl, Artifacts, JLLWrappers. Preferences, Base. BinaryPlatforms
4239 using Artifacts: load_artifacts_toml, unpack_platform
4340 using Base. BinaryPlatforms: triplet, select_platform
44- if ! @isdefined (augment_platform!)
45- augment_platform! (platform) = platform
46- end
4741 end
4842 end
4943end
@@ -126,7 +120,11 @@ function generate_wrapper_load(src_name, pkg_uuid, __source__)
126120 # running at toplevel, and therefore will be run completely at compile-time. We use
127121 # a `let` block here to avoid storing unnecessary data in our `.ji` files
128122
129- const host_platform = augment_platform! (HostPlatform ())
123+ if @isdefined (augment_platform!)
124+ const host_platform = augment_platform! (HostPlatform ())
125+ else
126+ const host_platform = nothing
127+ end
130128 best_wrapper = let
131129 artifacts_toml = joinpath ($ (pkg_dir), " .." , " Artifacts.toml" )
132130 valid_wrappers = Dict {Platform,String} ()
@@ -165,7 +163,11 @@ function generate_wrapper_load(src_name, pkg_uuid, __source__)
165163 end
166164
167165 # From the available options, choose the best wrapper script
168- select_platform (valid_wrappers, host_platform)
166+ if host_platform != = nothing
167+ select_platform (valid_wrappers, host_platform)
168+ else
169+ select_platform (valid_wrappers)
170+ end
169171 end
170172 end
171173
0 commit comments