Compiler optimization level
Control application of compiler optimizations
Model Configuration Pane: Code Generation
The Compiler optimization level parameter controls whether the build process applies compiler optimizations.
This parameter appears when the model is configured with a system target file that specifies toolchain-based code generation, as described in Configure Toolchain (ToolchainInfo) or Template Makefile Build Process.
This parameter enables Custom compiler optimization flags.
Optimizations off (faster builds)(default) |
Optimizations on (faster runs)|
Optimizations off (faster builds)
Customizes compilation during the build process to minimize compilation time.
Optimizations on (faster runs)
Customizes compilation during the makefile build process to minimize run time.
Allows you to specify custom compiler optimization flags to be applied during the makefile build process. Select this setting for generating code for these types of simulations:
Model reference simulation target
Normal mode for Stateflow and the MATLAB Function block
MATLAB System block
Optimizations on (faster runs)and
Optimizations off (faster builds)allow you to easily toggle compiler optimizations on and off during code development.
Customallows you to enter custom compiler optimization flags at Simulink® GUI level, rather than editing compiler flags into template makefiles (TMFs) or supplying compiler flags to make commands.
If you specify compiler options for your makefile build using
MEX_OPT_FILE, the value of Compiler optimization level is ignored and a warning is issued about the ignored parameter.
|Safety precaution||No impact|
|Type: character vector|
Introduced in R2007b