rustc -O -O is ok just like rustc -C opt-level=1 -C opt-level=2. -O is documented to be the same as -C opt-level=2, so there should be no conflict, just have the last argument take precedent.
-g vs -C debuginfo=2 behave the same way.
$ rustc -O -C opt-level=2
error: -O and -C opt-level both provided
$ rustc -C opt-level=1 -C opt-level=2 -g -g foo.rs
# ok.
rustc -O -Ois ok just likerustc -C opt-level=1 -C opt-level=2.-Ois documented to be the same as-C opt-level=2, so there should be no conflict, just have the last argument take precedent.-gvs-C debuginfo=2behave the same way.