Skip to content

Commit a4fc3a3

Browse files
committed
make sure that we use the augmented platform to select the artifact
1 parent ba76cad commit a4fc3a3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/toplevel_generators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function generate_wrapper_load(src_name, pkg_uuid, __source__)
127127
# running at toplevel, and therefore will be run completely at compile-time. We use
128128
# a `let` block here to avoid storing unnecessary data in our `.ji` files
129129

130-
host_platform = augment_platform!(HostPlatform())
130+
const host_platform = augment_platform!(HostPlatform())
131131
best_wrapper = let
132132
artifacts_toml = joinpath($(pkg_dir), "..", "Artifacts.toml")
133133
valid_wrappers = Dict{Platform,String}()

src/wrapper_generators.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ macro generate_wrapper_header(src_name)
1212
else
1313
# We explicitly use `macrocall` here so that we can manually pass the `__source__`
1414
# argument, to avoid `@artifact_str` trying to lookup `Artifacts.toml` here.
15-
return $(Expr(:macrocall, Symbol("@artifact_str"), __source__, src_name))
15+
if VERSION >= v"1.6"
16+
return $(Expr(:macrocall, Symbol("@artifact_str"), __source__, src_name, :(host_platform)))
17+
else
18+
return $(Expr(:macrocall, Symbol("@artifact_str"), __source__, src_name)
19+
end
1620
end
1721
end
1822
end)

0 commit comments

Comments
 (0)