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 @@ -250,16 +250,20 @@ function generate_precompile_statements()
250
250
module $pkgname
251
251
end
252
252
""" )
253
- tmp = tempname ()
253
+ tmp_prec = tempname ()
254
+ tmp_proc = tempname ()
254
255
s = """
255
256
pushfirst!(DEPOT_PATH, $(repr (prec_path)) );
256
- Base.PRECOMPILE_TRACE_COMPILE[] = $(repr (tmp )) ;
257
+ Base.PRECOMPILE_TRACE_COMPILE[] = $(repr (tmp_prec )) ;
257
258
Base.compilecache(Base.PkgId($(repr (pkgname)) ), $(repr (path)) )
258
259
$precompile_script
259
260
"""
260
- run (` $(julia_exepath ()) -O0 --sysimage $sysimg --startup-file=no -Cnative -e $s ` )
261
- for statement in split (read (tmp, String), ' \n ' )
262
- push! (statements, statement)
261
+ run (` $(julia_exepath ()) -O0 --sysimage $sysimg --trace-compile=$tmp_proc --startup-file=no -Cnative -e $s ` )
262
+ for f in (tmp_prec, tmp_proc)
263
+ for statement in split (read (f, String), ' \n ' )
264
+ occursin (" Main." , statement) && continue
265
+ push! (statements, statement)
266
+ end
263
267
end
264
268
end
265
269
You can’t perform that action at this time.
0 commit comments