Main Content

Custom compiler optimization flags


Specify compiler optimization flags to be applied to building the generated code for your model.


This parameter only appears when the model is configured to use a template makefile-based code generation target, as described in Configure Toolchain or Template Makefile Build Process.

Category: Code Generation


Default: ''

Specify compiler optimization flags without quotes, for example, -O2.


This parameter is enabled by selecting the value Custom for the parameter Compiler optimization level.

Command-Line Information

Parameter: RTWCustomCompilerOptimizations
Type: character vector
Value: '' | user-specified flags
Default: ''

Recommended Settings

See Compiler optimization level.

Related Topics