The short answer is more-or-less, "The compiler does not come into play if you are merely generating the C/C++ code." If one is, for example, generating an executable, using acceleration mode, simulating using an S-function, or performing hardware-in-loop simulation, a C/C++ compiler is invoked.
Embedded Coder generates ANSI/ISO C/C++ code and thus supports all embedded compilers and IDEs that support C/C++ code. If portable ANSI/ISO C/C++ that can be called by any scheduler is not sufficient, Embedded Coder has a variety of options and features that end users can leverage to generate target specific code for their particular compiler environment. A sample of these options and features are listed below.
Optimize Generated Code by Developing and Using Code Replacement Libraries - MATLAB and Simulink: https://www.mathworks.com/help//ecoder/examples/optimize-generated-code-by-developing-and-using-code-replacement-libraries-mc.html https://www.mathworks.com/help/ecoder/examples/optimize-generated-code-by-developing-and-using-code-replacement-libraries-sc.html
Custom Simulink Real-Time drivers: https://www.mathworks.com/help/xpc/driver/introduction.html
Memory/Pragma Sections: https://www.mathworks.com/help/ecoder/ug/control-data-and-function-placement-in-memory-by-inserting-pragmas.html
Legacy Code Integration using Legacy Code Tool: https://www.mathworks.com/help/simulink/legacy-code-integration.html
Control generation of Function Prototypes: https://www.mathworks.com/help/ecoder/ug/function-prototype-control.html
Code Generation from MATLAB and Simulink Code: https://www.mathworks.com/help/ecoder/c-c-code-generation-from-matlab-code.html https://www.mathworks.com/help/ecoder/c-c-code-generation-from-simulink-models.html
MATLAB Central contains several examples that may also be relevant to your needs: https://www.mathworks.com/matlabcentral/fileexchange/?term=Embedded+coder+type%3A%22Example%22&utf8=%E2%9C%93
Note that MathWorks does not guarantee or warrant the use or content of MATLAB Central submissions. Any questions, issues, or complaints should be directed to the contributing author.
In addition to ANSI C/C++ code generation and target customization options mentioned above, MathWorks and third party link and target products offer built-in integration support for several target, compiler, and RTOS combinations. These products provide device driver blocks, target optimized code, build environment automation, Processor-in-Loop testing, and other features.
You can find all the relevant details related to Embedded Coder in the below link: https://www.mathworks.com/products/embedded-coder.html
Finally, MathWorks consulting and a number of third parties service providers are able to create custom solutions for your target environment needs.