Yes, PETSc autodetects and will set the value of `PETSC_ARCH` precisely to `arch-darwin-opt` (given the options passed to `configure`). It's just that the value of `petsc_arch` is reused later in the formula. See my comments below.