JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.39k stars 185 forks source link

Allow the user to set `julia-args` for precompile execution #931

Open Drvi opened 3 months ago

Drvi commented 3 months ago

So they can run their potentially expensive precompile execution scripts with -O0.

Not sure if hardcoding -O0 would be preferable... I'm open to suggestions!

NHDaly commented 3 months ago

Not sure if hardcoding -O0 would be preferable... I'm open to suggestions!

It seems reasonable to me that PackageCompiler should just hardcode -O0 during the first pass over the snoop file, independently from letting the user pass custom julia-args. I don't see any reason to run the snoop file with anything other than -O0.

Drvi commented 3 months ago

I guess some precompilation workloads are not particularly light computationally and could take longer without optimizations... But yeah maybe -O0 should be the default :+1:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.62%. Comparing base (8cd96a1) to head (80c4211).

:exclamation: Current head 80c4211 differs from pull request most recent head feacfe0. Consider uploading reports for the commit feacfe0 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #931 +/- ## ======================================= Coverage 84.62% 84.62% ======================================= Files 3 3 Lines 826 826 ======================================= Hits 699 699 Misses 127 127 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

NHDaly commented 3 months ago

I guess some precompilation workloads are not particularly light computationally and could take longer without optimizations... But yeah maybe -O0 should be the default 👍

ah true, good point. 👍

NHDaly commented 3 months ago

Are the tests on Nightly unrelated?

Drvi commented 3 months ago

I checked a couple of nighly failures and there seems to be a bounds error: BoundsError(a=Array{Base.Partr.taskheap, 1}(dims=(0,), mem=Memory{Base.Partr.taskheap}(0, 0x7f3fe5b3e0b0)[]), i=(0,))

sjkelly commented 3 months ago

This is a good idea. My hope is that propagating and adding all sorts of these configurations will be easier with, https://github.com/JuliaLang/PackageCompiler.jl/pull/929

Can we split the difference and do -O1?