Can I set --optimize flag when calling script

If I call a script with ./script.jl (crucially, not julia script.jl) can I still set the -O flag somehow? Passing it in after the file name doesn’t seem to work.

What platform? If your script begins with a shebang, you can add options there. See e.g.

1 Like

Thanks!
It does indeed begin with a shebang. Can I vary the optimization level used? I.e. sometimes calling it with -O0 and other times -O3?

Thanks!
It does indeed begin with a shebang. Can I vary the optimization level used? I.e. sometimes calling it with -O0 and other times -O3 ?

Please tell us what platform you are using

1 Windows
2 Linux
3 Mac