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()
202202 module $pkgname
203203 end
204204 """ )
205- tmp = tempname ()
205+ tmp_prec = tempname ()
206+ tmp_proc = tempname ()
206207 s = """
207208 pushfirst!(DEPOT_PATH, $(repr (prec_path)) );
208- Base.PRECOMPILE_TRACE_COMPILE[] = $(repr (tmp )) ;
209+ Base.PRECOMPILE_TRACE_COMPILE[] = $(repr (tmp_prec )) ;
209210 Base.compilecache(Base.PkgId($(repr (pkgname)) ), $(repr (path)) )
210211 $precompile_script
211212 """
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
215219 end
216220 end
217221
You can’t perform that action at this time.
0 commit comments