As this is Not Multiple select question so Answer A is more accurate than B.
As there are front end and back end.
front end has 4 parts ( Lexical Analysis, Syntax Analysis , semantic Analysis and Intermediate Code generation)
This front end is same for different Operating systems because it is not converting target code for any particular machine.
Where as for back end there are only 2 parts ( Code Optimization and Target Code generator)
This Back end part is different for different OS.
That’s why Option A is correct.
Some code optimizations are carried out on the intermediate code because
they enhance the portability of the compiler to the target processor