fix disabling of optarch toolchain option

fix disabling of optarch toolchain option and extend unit tests to also test disabling of toolchain options