Skip to content

Commit 48e1a72

Browse files
Do not call rand during sysimage precompilation (#56227)
This change by itself doesn't do anything significant on `master`, but when backported to the v1.11 branch it'll address #56177. However it'd be great if someone could tell _why_ this fixes that issue, because it looks very unrelated. --------- Co-authored-by: Ian Butterworth <[email protected]> (cherry picked from commit f36f342)
1 parent b28fbd0 commit 48e1a72

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/generate_precompile.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ for match = Base._methods(+, (Int, Int), -1, Base.get_world_counter())
178178
# interactive statup uses this
179179
write(IOBuffer(), "")
180180
181-
# not critical, but helps hide unrelated compilation from @time when using --trace-compile
182-
foo() = rand(2,2) * rand(2,2)
183-
@time foo()
184-
@time foo()
181+
# Not critical, but helps hide unrelated compilation from @time when using --trace-compile.
182+
f55729() = Base.Experimental.@force_compile
183+
@time @eval f55729()
184+
@time @eval f55729()
185185
186186
break # only actually need to do this once
187187
end

0 commit comments

Comments
 (0)