After speaking with @ab and @rjmccall on https://reviews.llvm.org/D72841#2027740 and https://github.com/apple/llvm-project/pull/1202.
it sounds like code-gen option parsing should depend on language-option parsing, not the other way around. Apple Clang llvm-project master does this in the right order but upstream llvm.org does it in the opposite order.
This patch changes the order to the way apple-master does it, which we think is the correct order. At the moment D72841 causes some bot failures on apple-master (only on tests added in D72841). I think D72841 should be reverted, and then reapplied after _this_ patch is landed.