Couple of questions regarding this.
First, is there a good way to determine inside the Julia session what the current setting of the optimization level is?
Second, is there some reason this behavior is correct?
$ julia -O # no error
$ julia --optimize -t auto # no error
$ julia -t auto -O # no error
$ julia -O1 -t auto # no error
$ julia -O -t auto
ERROR: julia: invalid argument to -O (-t)
$ julia -O -v
ERROR: julia: invalid argument to -O (-v)
According to the docs,
-O,--optimize={0,1,2*,3}Set the optimization level (level is 3 if-Ois used without a level)
… it seems that the bit about -O being used without a level only works if it is the last argument.
The same kind of thing happens with the -g flag
$ julia -g -t auto
ERROR: julia: invalid argument to -g (-t)