@@ -10,7 +10,7 @@ macro generate_wrapper_header(src_name)
10
10
@static if isdir (joinpath (dirname ($ (pkg_dir)), " override" ))
11
11
return joinpath (dirname ($ (pkg_dir)), " override" )
12
12
elseif @isdefined (augment_platform!) && VERSION >= v " 1.6"
13
- $ (Expr (:macrocall , Symbol (" @artifact_str" ), __source__, src_name, :( host_platform) ))
13
+ $ (Expr (:macrocall , Symbol (" @artifact_str" ), __source__, src_name, __module__ . host_platform))
14
14
else
15
15
# We explicitly use `macrocall` here so that we can manually pass the `__source__`
16
16
# argument, to avoid `@artifact_str` trying to lookup `Artifacts.toml` here.
@@ -30,17 +30,22 @@ macro generate_init_header(dependencies...)
30
30
eager_mode = Expr[]
31
31
if ! isempty (dependencies)
32
32
for dep in dependencies
33
- push! (deps_path_add, quote
34
- isdefined ($ (dep), :PATH_list ) && append! (PATH_list, $ (dep). PATH_list)
35
- isdefined ($ (dep), :LIBPATH_list ) && append! (LIBPATH_list, $ (dep). LIBPATH_list)
36
- end )
37
- push! (eager_mode, :(isdefined ($ (dep), :eager_mode ) && $ (dep). eager_mode ()))
33
+ depmod = getfield (__module__, dep)
34
+ if isdefined (depmod, :PATH_list )
35
+ push! (deps_path_add, :(append! (PATH_list, $ (dep). PATH_list)))
36
+ end
37
+ if isdefined (depmod, :LIBPATH_list )
38
+ push! (deps_path_add, :(append! (LIBPATH_list, $ (dep). LIBPATH_list)))
39
+ end
40
+ if isdefined (depmod, :eager_mode )
41
+ push! (eager_mode, :($ (dep). eager_mode ()))
42
+ end
38
43
end
39
44
end
40
45
41
46
return excat (
42
47
# This either calls `@artifact_str()`, or returns a constant string if we're overridden.
43
- :(global artifact_dir = find_artifact_dir ()),
48
+ :(global artifact_dir = find_artifact_dir ():: String ),
44
49
45
50
# Add `eager_mode` invocations on all our dependencies
46
51
eager_mode... ,
0 commit comments