Skip to content

Commit a440851

Browse files
authored
Revert "Move init of path lists in JLLs to precompile time (#844)" (#882)
This reverts commit bfb4675.
1 parent a262262 commit a440851

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/AutoBuild.jl

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,16 +1143,6 @@ function build_jll_package(src_name::String,
11431143
""")
11441144
end
11451145

1146-
if !isempty(dependencies)
1147-
print(io, """
1148-
# Initialize PATH and LIBPATH environment variable listings.
1149-
# From the list of our dependencies, generate a tuple of all the PATH and LIBPATH lists,
1150-
# then append them to our own.
1151-
foreach(p -> append!(PATH_list, p), ($(join(["$(getname(dep)).PATH_list" for dep in dependencies], ", ")),))
1152-
foreach(p -> append!(LIBPATH_list, p), ($(join(["$(getname(dep)).LIBPATH_list" for dep in dependencies], ", ")),))
1153-
""")
1154-
end
1155-
11561146
print(io, """
11571147
# Inform that the wrapper is available for this platform
11581148
wrapper_available = true
@@ -1167,6 +1157,19 @@ function build_jll_package(src_name::String,
11671157
global PATH_list, LIBPATH_list
11681158
""")
11691159

1160+
if !isempty(dependencies)
1161+
# Note: this needs to be done at init time, because the path
1162+
# lists can change after precompile-time if we move the
1163+
# artifacts depot.
1164+
println(io, """
1165+
# Initialize PATH and LIBPATH environment variable listings
1166+
# From the list of our dependencies, generate a tuple of all the PATH and LIBPATH lists,
1167+
# then append them to our own.
1168+
foreach(p -> append!(PATH_list, p), ($(join(["$(getname(dep)).PATH_list" for dep in dependencies], ", ")),))
1169+
foreach(p -> append!(LIBPATH_list, p), ($(join(["$(getname(dep)).LIBPATH_list" for dep in dependencies], ", ")),))
1170+
""")
1171+
end
1172+
11701173
for (p, p_info) in sort(products_info)
11711174
vp = variable_name(p)
11721175

0 commit comments

Comments
 (0)