File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -202,16 +202,20 @@ function generate_precompile_statements()
202
202
module $pkgname
203
203
end
204
204
""" )
205
- tmp = tempname ()
205
+ tmp_prec = tempname ()
206
+ tmp_proc = tempname ()
206
207
s = """
207
208
pushfirst!(DEPOT_PATH, $(repr (prec_path)) );
208
- Base.PRECOMPILE_TRACE_COMPILE[] = $(repr (tmp )) ;
209
+ Base.PRECOMPILE_TRACE_COMPILE[] = $(repr (tmp_prec )) ;
209
210
Base.compilecache(Base.PkgId($(repr (pkgname)) ), $(repr (path)) )
210
211
$precompile_script
211
212
"""
212
- run (` $(julia_exepath ()) -O0 --sysimage $sysimg --startup-file=no -Cnative -e $s ` )
213
- for statement in split (read (tmp, String), ' \n ' )
214
- push! (statements, statement)
213
+ run (` $(julia_exepath ()) -O0 --sysimage $sysimg --trace-compile=$tmp_proc --startup-file=no -Cnative -e $s ` )
214
+ for f in (tmp_prec, tmp_proc)
215
+ for statement in split (read (f, String), ' \n ' )
216
+ occursin (" Main." , statement) && continue
217
+ push! (statements, statement)
218
+ end
215
219
end
216
220
end
217
221
You can’t perform that action at this time.
0 commit comments